@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/cjs/index.js CHANGED
@@ -485,16 +485,18 @@ var ColumnList = ({
485
485
  ({ target }) => {
486
486
  const input = target;
487
487
  const listItem = (0, import_vuu_utils10.queryClosest)(target, `.${classBaseListItem}`);
488
- const {
489
- dataset: { name: name2 }
490
- } = listItem;
491
- if (name2) {
492
- const saltCheckbox = (0, import_vuu_utils10.queryClosest)(target, `.${classBase6}-checkBox`);
493
- const saltSwitch = (0, import_vuu_utils10.queryClosest)(target, `.${classBase6}-switch`);
494
- if (saltCheckbox) {
495
- onChange(name2, "subscribed", input.checked);
496
- } else if (saltSwitch) {
497
- onChange(name2, "hidden", input.checked === false);
488
+ if (listItem) {
489
+ const {
490
+ dataset: { name: name2 }
491
+ } = listItem;
492
+ if (name2) {
493
+ const saltCheckbox = (0, import_vuu_utils10.queryClosest)(target, `.${classBase6}-checkBox`);
494
+ const saltSwitch = (0, import_vuu_utils10.queryClosest)(target, `.${classBase6}-switch`);
495
+ if (saltCheckbox) {
496
+ onChange(name2, "subscribed", input.checked);
497
+ } else if (saltSwitch) {
498
+ onChange(name2, "hidden", input.checked === false);
499
+ }
498
500
  }
499
501
  }
500
502
  },
@@ -3308,15 +3310,17 @@ var useTableSettings = ({
3308
3310
  const handleChangeTableAttribute = (0, import_react19.useCallback)(
3309
3311
  (evt) => {
3310
3312
  const button = (0, import_vuu_utils23.queryClosest)(evt.target, "button");
3311
- const { ariaPressed, value } = button;
3312
- console.log({ ariaPressed, value, button });
3313
- setColumnState((state) => ({
3314
- ...state,
3315
- tableConfig: {
3316
- ...state.tableConfig,
3317
- [value]: ariaPressed !== "true"
3318
- }
3319
- }));
3313
+ if (button) {
3314
+ const { ariaPressed, value } = button;
3315
+ console.log({ ariaPressed, value, button });
3316
+ setColumnState((state) => ({
3317
+ ...state,
3318
+ tableConfig: {
3319
+ ...state.tableConfig,
3320
+ [value]: ariaPressed !== "true"
3321
+ }
3322
+ }));
3323
+ }
3320
3324
  },
3321
3325
  []
3322
3326
  );