@apexcura/ui-components 0.0.13-Beta14 → 0.0.13-Beta15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -243,10 +243,10 @@ var CheckboxElement = (props) => {
243
243
  const [checkedList, setCheckedList] = (0, import_react7.useState)(defaultCheckedList);
244
244
  const checkAll = props.options && props.options.length === checkedList.length;
245
245
  const handleChange = (list) => {
246
- const toggledOption = list.find((option) => !checkedList.includes(option)) || checkedList.find((option) => !list.includes(option));
247
246
  setCheckedList(list);
248
247
  if (props.onChange) {
249
- props.onChange(toggledOption);
248
+ const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
249
+ props.onChange(selectedOptions);
250
250
  }
251
251
  };
252
252
  const onHandleAllChanges = (e) => {
package/dist/index.mjs CHANGED
@@ -190,10 +190,10 @@ var CheckboxElement = (props) => {
190
190
  const [checkedList, setCheckedList] = useState3(defaultCheckedList);
191
191
  const checkAll = props.options && props.options.length === checkedList.length;
192
192
  const handleChange = (list) => {
193
- const toggledOption = list.find((option) => !checkedList.includes(option)) || checkedList.find((option) => !list.includes(option));
194
193
  setCheckedList(list);
195
194
  if (props.onChange) {
196
- props.onChange(toggledOption);
195
+ const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
196
+ props.onChange(selectedOptions);
197
197
  }
198
198
  };
199
199
  const onHandleAllChanges = (e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.13-Beta14",
3
+ "version": "0.0.13-Beta15",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",