@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.
@@ -3456,8 +3456,12 @@ const useColumnVisibility = ({ columnVisibility: controlledVisibility, onColumnV
3456
3456
  controlledOnChange?.(updaterOrValue);
3457
3457
  }, [visibility, isControlled, controlledOnChange]);
3458
3458
  const hideColumn = React.useCallback((columnId) => {
3459
- onColumnVisibilityChange(old => ({ ...old, [columnId]: false }));
3460
- onColumnHide?.(columnId);
3459
+ if (onColumnHide) {
3460
+ onColumnHide(columnId);
3461
+ }
3462
+ else {
3463
+ onColumnVisibilityChange(old => ({ ...old, [columnId]: false }));
3464
+ }
3461
3465
  }, [onColumnVisibilityChange, onColumnHide]);
3462
3466
  const showColumn = React.useCallback((columnId) => {
3463
3467
  onColumnVisibilityChange(old => ({ ...old, [columnId]: true }));
@@ -3588,7 +3592,7 @@ const DataTablePagination = ({ currentPage, pageCount, onPageChange, }) => {
3588
3592
  const HeaderCellMenu = ({ column, enableAddColumn, enableColumnFreeze, isColumnPinned, canMoveLeft, canMoveRight, onSort, onHideColumn, onTogglePin, onAddColumn, onDeleteColumn, onMoveColumn, onMoreActionClick, columnIndex, }) => {
3589
3593
  const meta = column.columnDef.meta;
3590
3594
  const isSortable = column.getCanSort();
3591
- const isHidable = meta?.isHidable !== false;
3595
+ const isHidable = column.getCanHide();
3592
3596
  const isDeletable = meta?.isDeletable === true;
3593
3597
  const moreActions = meta?.moreActions ?? [];
3594
3598
  const currentSort = column.getIsSorted();
@@ -3849,4 +3853,4 @@ exports.useColumnVisibility = useColumnVisibility;
3849
3853
  exports.useTablePagination = useTablePagination;
3850
3854
  exports.useTableSelection = useTableSelection;
3851
3855
  exports.useTableSort = useTableSort;
3852
- //# sourceMappingURL=DataTable-D_rEai97.js.map
3856
+ //# sourceMappingURL=DataTable-Dg0pX7Ng.js.map