@bigbinary/neeto-atoms 1.0.108 → 1.0.110

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.
@@ -3655,7 +3655,9 @@ const useColumnResize = ({
3655
3655
  const userResizedColumnsRef = useRef(
3656
3656
  new Set(initialUserResizedIds ?? [])
3657
3657
  );
3658
- const columns = table.options.columns;
3658
+ const columnsKey = JSON.stringify(
3659
+ table.getAllLeafColumns().map((col) => [col.id, col.columnDef.size ?? null])
3660
+ );
3659
3661
  const clearUserResized = useCallback(
3660
3662
  (columnId) => {
3661
3663
  userResizedColumnsRef.current.delete(columnId);
@@ -3743,7 +3745,7 @@ const useColumnResize = ({
3743
3745
  }
3744
3746
  });
3745
3747
  if (changed) setColumnSizing((prev) => ({ ...prev, ...newSizing }));
3746
- }, [containerWidth, enabled, columns, columnVisibility, hasSelectionColumn]);
3748
+ }, [containerWidth, enabled, columnsKey, columnVisibility, hasSelectionColumn]);
3747
3749
  const lastDataColumnId = enabled ? (() => {
3748
3750
  const dataCols = table.getVisibleLeafColumns().filter((col) => col.id !== "_selection");
3749
3751
  const lastNonPinned = dataCols.filter((col) => !col.getIsPinned()).at(-1);
@@ -3963,7 +3965,7 @@ const HeaderCellMenu = ({
3963
3965
  const enableDelete = meta?.enableDelete === true;
3964
3966
  const moreActions = meta?.moreActions ?? [];
3965
3967
  const currentSort = column.getIsSorted();
3966
- const hasAnyAction = isSortable || isHidable || enableAddColumn || enableColumnFreeze && column.getCanPin() || enableDelete || onMoveColumn && (canMoveLeft || canMoveRight) || moreActions.length > 0;
3968
+ const hasAnyAction = isSortable || isHidable && !!onHideColumn || enableAddColumn || enableColumnFreeze && column.getCanPin() || enableDelete && !!onDeleteColumn || onMoveColumn && (canMoveLeft || canMoveRight) || moreActions.length > 0;
3967
3969
  if (!hasAnyAction) return null;
3968
3970
  return /* @__PURE__ */ jsx("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [
3969
3971
  /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
@@ -4155,7 +4157,7 @@ const DataTable = ({
4155
4157
  persistColumnSizing = false,
4156
4158
  columnSizing: columnSizingProp,
4157
4159
  onColumnSizingChange: onColumnSizingChangeProp,
4158
- enableColumnFreeze = true,
4160
+ enableColumnFreeze = false,
4159
4161
  columnPinning: columnPinningProp,
4160
4162
  onColumnPinningChange: onColumnPinningChangeProp,
4161
4163
  localStorageKeyPrefix,
@@ -4239,7 +4241,7 @@ const DataTable = ({
4239
4241
  columnOrder: columnOrderProp,
4240
4242
  onColumnOrderChange: onColumnOrderChangeProp
4241
4243
  });
4242
- const showHeaderMenu = enableHeaderMenu ?? (enableColumnFreeze || enableAddColumn || !!onColumnHideProp || !!onColumnDelete || !!onColumnUpdate || !!onMoreActionClick);
4244
+ const showHeaderMenu = enableHeaderMenu ?? (enableSorting || enableColumnFreeze || enableAddColumn || !!onColumnHideProp || !!onColumnDelete || !!onColumnUpdate || !!onMoreActionClick);
4243
4245
  const allColumns = useMemo(() => {
4244
4246
  const cols = enableColumnResize ? columns.map((col) => ({
4245
4247
  ...col,
@@ -4478,7 +4480,7 @@ const DataTable = ({
4478
4480
  /* @__PURE__ */ jsx(HeaderDescription, { column: header.column })
4479
4481
  ] }),
4480
4482
  /* @__PURE__ */ jsx(SortIndicator, { column: header.column }),
4481
- showHeaderMenu && !isSelectionCol && /* @__PURE__ */ jsx(
4483
+ showHeaderMenu && /* @__PURE__ */ jsx(
4482
4484
  HeaderCellMenu,
4483
4485
  {
4484
4486
  column: header.column,
@@ -4583,4 +4585,4 @@ const DataTable = ({
4583
4585
  };
4584
4586
 
4585
4587
  export { DataTable as D, useColumnPinning as a, useColumnVisibility as b, useTablePagination as c, useTableSelection as d, useTableSort as e, useColumnOrdering as u };
4586
- //# sourceMappingURL=DataTable-mxDU-16D.js.map
4588
+ //# sourceMappingURL=DataTable-Dhqp51p8.js.map