@vuu-ui/vuu-table-extras 0.8.27-debug → 0.8.28-debug

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/esm/index.js CHANGED
@@ -459,16 +459,18 @@ var ColumnList = ({
459
459
  ({ target }) => {
460
460
  const input = target;
461
461
  const listItem = queryClosest(target, `.${classBaseListItem}`);
462
- const {
463
- dataset: { name: name2 }
464
- } = listItem;
465
- if (name2) {
466
- const saltCheckbox = queryClosest(target, `.${classBase6}-checkBox`);
467
- const saltSwitch = queryClosest(target, `.${classBase6}-switch`);
468
- if (saltCheckbox) {
469
- onChange(name2, "subscribed", input.checked);
470
- } else if (saltSwitch) {
471
- onChange(name2, "hidden", input.checked === false);
462
+ if (listItem) {
463
+ const {
464
+ dataset: { name: name2 }
465
+ } = listItem;
466
+ if (name2) {
467
+ const saltCheckbox = queryClosest(target, `.${classBase6}-checkBox`);
468
+ const saltSwitch = queryClosest(target, `.${classBase6}-switch`);
469
+ if (saltCheckbox) {
470
+ onChange(name2, "subscribed", input.checked);
471
+ } else if (saltSwitch) {
472
+ onChange(name2, "hidden", input.checked === false);
473
+ }
472
474
  }
473
475
  }
474
476
  },
@@ -3398,15 +3400,17 @@ var useTableSettings = ({
3398
3400
  const handleChangeTableAttribute = useCallback14(
3399
3401
  (evt) => {
3400
3402
  const button = queryClosest3(evt.target, "button");
3401
- const { ariaPressed, value } = button;
3402
- console.log({ ariaPressed, value, button });
3403
- setColumnState((state) => ({
3404
- ...state,
3405
- tableConfig: {
3406
- ...state.tableConfig,
3407
- [value]: ariaPressed !== "true"
3408
- }
3409
- }));
3403
+ if (button) {
3404
+ const { ariaPressed, value } = button;
3405
+ console.log({ ariaPressed, value, button });
3406
+ setColumnState((state) => ({
3407
+ ...state,
3408
+ tableConfig: {
3409
+ ...state.tableConfig,
3410
+ [value]: ariaPressed !== "true"
3411
+ }
3412
+ }));
3413
+ }
3410
3414
  },
3411
3415
  []
3412
3416
  );