diff --git a/README.md b/README.md index f08cfe466..372b93bc4 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,9 @@ E.g., if it was used in a menu and the menu is red, the circle would be red. ### **WORK IN PROGRESS** --> ## Changelog +### **WORK IN PROGRESS** +* (foxriver76) implemented select/unselect all buttons + ### 2.5.0 (2023-11-11) * (foxriver76) allow to use real html in HTML prepend and HTML append (basic string widget) * (foxriver76) fixed problem while editing groups diff --git a/src/src/Attributes/Widget/index.jsx b/src/src/Attributes/Widget/index.jsx index 465991e16..3680fdd60 100644 --- a/src/src/Attributes/Widget/index.jsx +++ b/src/src/Attributes/Widget/index.jsx @@ -663,8 +663,9 @@ class Widget extends Component { }); } else { fields = selectedWidgetsFields[0]; - widgets[this.props.selectedWidgets[0]].data.bindings.forEach(attr => !bindFields.includes(`data_${attr}`) && bindFields.push(`data_${attr}`)); - widgets[this.props.selectedWidgets[0]].style.bindings.forEach(attr => !bindFields.includes(`style_${attr}`) && bindFields.push(`style_${attr}`)); + + widgets[this.props.selectedWidgets[0]].data.bindings?.forEach(attr => !bindFields.includes(`data_${attr}`) && bindFields.push(`data_${attr}`)); + widgets[this.props.selectedWidgets[0]].style.bindings?.forEach(attr => !bindFields.includes(`style_${attr}`) && bindFields.push(`style_${attr}`)); } newState.bindFields = bindFields.sort(); diff --git a/src/src/Toolbar/MultiSelect.js b/src/src/Toolbar/MultiSelect.js index 8c90a2aa7..80b7095e4 100644 --- a/src/src/Toolbar/MultiSelect.js +++ b/src/src/Toolbar/MultiSelect.js @@ -1,13 +1,13 @@ import React, { Component } from 'react'; import { withStyles } from '@mui/styles'; import { - Checkbox, FormControl, MenuItem, Menu, List, ListItemButton, ListItemText, ListItemIcon, InputLabel, + Checkbox, FormControl, MenuItem, Menu, List, ListItemButton, ListItemText, ListItemIcon, InputLabel, Button, } from '@mui/material'; import IconArrowDown from '@mui/icons-material/ArrowDropDown'; import IconArrowUp from '@mui/icons-material/ArrowDropUp'; -import { Utils } from '@iobroker/adapter-react-v5'; +import { Utils, I18n } from '@iobroker/adapter-react-v5'; const styles = theme => ({ navMain: { @@ -145,6 +145,10 @@ class MultiSelect extends Component { anchorEl={this.state.elAnchor} onClose={() => this.setState({ elAnchor: null })} > +