@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.
- package/dist/{DataTable-mxDU-16D.js → DataTable-Dhqp51p8.js} +9 -7
- package/dist/DataTable-Dhqp51p8.js.map +1 -0
- package/dist/cjs/{DataTable-OtA15NKE.js → DataTable-BpX59uHL.js} +9 -7
- package/dist/cjs/DataTable-BpX59uHL.js.map +1 -0
- package/dist/cjs/components/DataTable.js +1 -1
- package/dist/cjs/components/index.js +12 -12
- package/dist/cjs/index.js +12 -12
- package/dist/components/DataTable/types.d.ts +5 -0
- package/dist/components/DataTable.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/DataTable-mxDU-16D.js.map +0 -1
- package/dist/cjs/DataTable-OtA15NKE.js.map +0 -1
|
@@ -3655,7 +3655,9 @@ const useColumnResize = ({
|
|
|
3655
3655
|
const userResizedColumnsRef = useRef(
|
|
3656
3656
|
new Set(initialUserResizedIds ?? [])
|
|
3657
3657
|
);
|
|
3658
|
-
const
|
|
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,
|
|
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 =
|
|
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 &&
|
|
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-
|
|
4588
|
+
//# sourceMappingURL=DataTable-Dhqp51p8.js.map
|