@apexcura/ui-components 0.0.13-Beta13 → 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 +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -245,7 +245,8 @@ var CheckboxElement = (props) => {
|
|
|
245
245
|
const handleChange = (list) => {
|
|
246
246
|
setCheckedList(list);
|
|
247
247
|
if (props.onChange) {
|
|
248
|
-
|
|
248
|
+
const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
|
|
249
|
+
props.onChange(selectedOptions);
|
|
249
250
|
}
|
|
250
251
|
};
|
|
251
252
|
const onHandleAllChanges = (e) => {
|
|
@@ -274,7 +275,7 @@ var CheckboxElement = (props) => {
|
|
|
274
275
|
className: props.className,
|
|
275
276
|
options: props.options,
|
|
276
277
|
value: checkedList,
|
|
277
|
-
onChange:
|
|
278
|
+
onChange: handleChange
|
|
278
279
|
}
|
|
279
280
|
));
|
|
280
281
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -192,7 +192,8 @@ var CheckboxElement = (props) => {
|
|
|
192
192
|
const handleChange = (list) => {
|
|
193
193
|
setCheckedList(list);
|
|
194
194
|
if (props.onChange) {
|
|
195
|
-
|
|
195
|
+
const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
|
|
196
|
+
props.onChange(selectedOptions);
|
|
196
197
|
}
|
|
197
198
|
};
|
|
198
199
|
const onHandleAllChanges = (e) => {
|
|
@@ -221,7 +222,7 @@ var CheckboxElement = (props) => {
|
|
|
221
222
|
className: props.className,
|
|
222
223
|
options: props.options,
|
|
223
224
|
value: checkedList,
|
|
224
|
-
onChange:
|
|
225
|
+
onChange: handleChange
|
|
225
226
|
}
|
|
226
227
|
));
|
|
227
228
|
};
|