@apexcura/ui-components 0.0.13-Beta11 → 0.0.13-Beta12

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,13 +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
- console.log("list========", list);
247
246
  setCheckedList(list);
247
+ console.log("checkedList-----", checkedList);
248
248
  if (props.onChange) {
249
- const selectedOptions = list.map((value) => {
250
- return { id: list.indexOf(value), value };
251
- });
252
- props.onChange(selectedOptions);
249
+ props.onChange(list);
253
250
  }
254
251
  };
255
252
  const onHandleAllChanges = (e) => {
@@ -278,7 +275,7 @@ var CheckboxElement = (props) => {
278
275
  className: props.className,
279
276
  options: props.options,
280
277
  value: checkedList,
281
- onChange: handleChange
278
+ onChange: (option) => handleChange(option)
282
279
  }
283
280
  ));
284
281
  };
package/dist/index.mjs CHANGED
@@ -190,13 +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
- console.log("list========", list);
194
193
  setCheckedList(list);
194
+ console.log("checkedList-----", checkedList);
195
195
  if (props.onChange) {
196
- const selectedOptions = list.map((value) => {
197
- return { id: list.indexOf(value), value };
198
- });
199
- props.onChange(selectedOptions);
196
+ props.onChange(list);
200
197
  }
201
198
  };
202
199
  const onHandleAllChanges = (e) => {
@@ -225,7 +222,7 @@ var CheckboxElement = (props) => {
225
222
  className: props.className,
226
223
  options: props.options,
227
224
  value: checkedList,
228
- onChange: handleChange
225
+ onChange: (option) => handleChange(option)
229
226
  }
230
227
  ));
231
228
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.13-Beta11",
3
+ "version": "0.0.13-Beta12",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",