@bigbinary/neeto-atoms 1.0.33 → 1.0.35

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.
@@ -3435,8 +3435,12 @@ const useColumnVisibility = ({ columnVisibility: controlledVisibility, onColumnV
3435
3435
  controlledOnChange?.(updaterOrValue);
3436
3436
  }, [visibility, isControlled, controlledOnChange]);
3437
3437
  const hideColumn = useCallback((columnId) => {
3438
- onColumnVisibilityChange(old => ({ ...old, [columnId]: false }));
3439
- onColumnHide?.(columnId);
3438
+ if (onColumnHide) {
3439
+ onColumnHide(columnId);
3440
+ }
3441
+ else {
3442
+ onColumnVisibilityChange(old => ({ ...old, [columnId]: false }));
3443
+ }
3440
3444
  }, [onColumnVisibilityChange, onColumnHide]);
3441
3445
  const showColumn = useCallback((columnId) => {
3442
3446
  onColumnVisibilityChange(old => ({ ...old, [columnId]: true }));
@@ -3567,7 +3571,7 @@ const DataTablePagination = ({ currentPage, pageCount, onPageChange, }) => {
3567
3571
  const HeaderCellMenu = ({ column, enableAddColumn, enableColumnFreeze, isColumnPinned, canMoveLeft, canMoveRight, onSort, onHideColumn, onTogglePin, onAddColumn, onDeleteColumn, onMoveColumn, onMoreActionClick, columnIndex, }) => {
3568
3572
  const meta = column.columnDef.meta;
3569
3573
  const isSortable = column.getCanSort();
3570
- const isHidable = meta?.isHidable !== false;
3574
+ const isHidable = column.getCanHide();
3571
3575
  const isDeletable = meta?.isDeletable === true;
3572
3576
  const moreActions = meta?.moreActions ?? [];
3573
3577
  const currentSort = column.getIsSorted();
@@ -3822,4 +3826,4 @@ const DataTable = ({ columns, data, getRowId: getRowIdProp, sorting: sortingProp
3822
3826
  };
3823
3827
 
3824
3828
  export { DataTable as D, useColumnPinning as a, useColumnVisibility as b, useTablePagination as c, useTableSelection as d, useTableSort as e, useColumnOrdering as u };
3825
- //# sourceMappingURL=DataTable-C5vfL2Hc.js.map
3829
+ //# sourceMappingURL=DataTable-ZLvVywpD.js.map