@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.
@@ -3676,7 +3676,9 @@ const useColumnResize = ({
3676
3676
  const userResizedColumnsRef = React.useRef(
3677
3677
  new Set(initialUserResizedIds ?? [])
3678
3678
  );
3679
- const columns = table.options.columns;
3679
+ const columnsKey = JSON.stringify(
3680
+ table.getAllLeafColumns().map((col) => [col.id, col.columnDef.size ?? null])
3681
+ );
3680
3682
  const clearUserResized = React.useCallback(
3681
3683
  (columnId) => {
3682
3684
  userResizedColumnsRef.current.delete(columnId);
@@ -3764,7 +3766,7 @@ const useColumnResize = ({
3764
3766
  }
3765
3767
  });
3766
3768
  if (changed) setColumnSizing((prev) => ({ ...prev, ...newSizing }));
3767
- }, [containerWidth, enabled, columns, columnVisibility, hasSelectionColumn]);
3769
+ }, [containerWidth, enabled, columnsKey, columnVisibility, hasSelectionColumn]);
3768
3770
  const lastDataColumnId = enabled ? (() => {
3769
3771
  const dataCols = table.getVisibleLeafColumns().filter((col) => col.id !== "_selection");
3770
3772
  const lastNonPinned = dataCols.filter((col) => !col.getIsPinned()).at(-1);
@@ -3984,7 +3986,7 @@ const HeaderCellMenu = ({
3984
3986
  const enableDelete = meta?.enableDelete === true;
3985
3987
  const moreActions = meta?.moreActions ?? [];
3986
3988
  const currentSort = column.getIsSorted();
3987
- const hasAnyAction = isSortable || isHidable || enableAddColumn || enableColumnFreeze && column.getCanPin() || enableDelete || onMoveColumn && (canMoveLeft || canMoveRight) || moreActions.length > 0;
3989
+ const hasAnyAction = isSortable || isHidable && !!onHideColumn || enableAddColumn || enableColumnFreeze && column.getCanPin() || enableDelete && !!onDeleteColumn || onMoveColumn && (canMoveLeft || canMoveRight) || moreActions.length > 0;
3988
3990
  if (!hasAnyAction) return null;
3989
3991
  return /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsxs(primitives_DropdownMenu.DropdownMenu, { children: [
3990
3992
  /* @__PURE__ */ jsxRuntime.jsx(primitives_DropdownMenu.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -4176,7 +4178,7 @@ const DataTable = ({
4176
4178
  persistColumnSizing = false,
4177
4179
  columnSizing: columnSizingProp,
4178
4180
  onColumnSizingChange: onColumnSizingChangeProp,
4179
- enableColumnFreeze = true,
4181
+ enableColumnFreeze = false,
4180
4182
  columnPinning: columnPinningProp,
4181
4183
  onColumnPinningChange: onColumnPinningChangeProp,
4182
4184
  localStorageKeyPrefix,
@@ -4260,7 +4262,7 @@ const DataTable = ({
4260
4262
  columnOrder: columnOrderProp,
4261
4263
  onColumnOrderChange: onColumnOrderChangeProp
4262
4264
  });
4263
- const showHeaderMenu = enableHeaderMenu ?? (enableColumnFreeze || enableAddColumn || !!onColumnHideProp || !!onColumnDelete || !!onColumnUpdate || !!onMoreActionClick);
4265
+ const showHeaderMenu = enableHeaderMenu ?? (enableSorting || enableColumnFreeze || enableAddColumn || !!onColumnHideProp || !!onColumnDelete || !!onColumnUpdate || !!onMoreActionClick);
4264
4266
  const allColumns = React.useMemo(() => {
4265
4267
  const cols = enableColumnResize ? columns.map((col) => ({
4266
4268
  ...col,
@@ -4499,7 +4501,7 @@ const DataTable = ({
4499
4501
  /* @__PURE__ */ jsxRuntime.jsx(HeaderDescription, { column: header.column })
4500
4502
  ] }),
4501
4503
  /* @__PURE__ */ jsxRuntime.jsx(SortIndicator, { column: header.column }),
4502
- showHeaderMenu && !isSelectionCol && /* @__PURE__ */ jsxRuntime.jsx(
4504
+ showHeaderMenu && /* @__PURE__ */ jsxRuntime.jsx(
4503
4505
  HeaderCellMenu,
4504
4506
  {
4505
4507
  column: header.column,
@@ -4610,4 +4612,4 @@ exports.useColumnVisibility = useColumnVisibility;
4610
4612
  exports.useTablePagination = useTablePagination;
4611
4613
  exports.useTableSelection = useTableSelection;
4612
4614
  exports.useTableSort = useTableSort;
4613
- //# sourceMappingURL=DataTable-OtA15NKE.js.map
4615
+ //# sourceMappingURL=DataTable-BpX59uHL.js.map