schummar-table 0.51.3 → 0.51.4
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/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +13 -13
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/mui4Theme.d.cts +1 -1
- package/dist/mui4Theme.d.ts +1 -1
- package/dist/mui5Theme.d.cts +1 -1
- package/dist/mui5Theme.d.ts +1 -1
- package/dist/{types-DqoOnlp7.d.cts → types-1gz-mJJm.d.cts} +2 -1
- package/dist/{types-BfdXNfLi.d.ts → types-CJOB-Acy.d.ts} +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2901,8 +2901,11 @@ function filterColumns(state) {
|
|
|
2901
2901
|
], ([columns, hiddenColumns, columnOrder, displaySize], draft) => {
|
|
2902
2902
|
draft.activeColumns = orderBy(columns.filter((column) => !(column.hidden ?? hiddenColumns.has(column.id))), [(column) => columnOrder.indexOf(column.id)]);
|
|
2903
2903
|
draft.visibleColumns = draft.activeColumns.filter((column) => displaySize === void 0 || column.displaySize === void 0 || column.displaySize.includes(displaySize));
|
|
2904
|
-
draft.rowHeights.clear();
|
|
2905
2904
|
}, { runNow: true }), [state]);
|
|
2905
|
+
(0, react.useEffect)(() => state.addReaction((state$1) => new Set(state$1.visibleColumns.map((column) => column.id)), (_, draft) => {
|
|
2906
|
+
draft.rowHeights.clear();
|
|
2907
|
+
draft.rowHeightsKey = Math.random();
|
|
2908
|
+
}, { runNow: false }), [state]);
|
|
2906
2909
|
}
|
|
2907
2910
|
|
|
2908
2911
|
//#endregion
|
|
@@ -3009,6 +3012,7 @@ function useTableState(_props) {
|
|
|
3009
3012
|
selection: props.defaultSelection ?? /* @__PURE__ */ new Set(),
|
|
3010
3013
|
expanded: props.defaultExpanded ?? /* @__PURE__ */ new Set(),
|
|
3011
3014
|
rowHeights: /* @__PURE__ */ new Map(),
|
|
3015
|
+
rowHeightsKey: Math.random(),
|
|
3012
3016
|
filters: /* @__PURE__ */ new Map(),
|
|
3013
3017
|
filterValues: /* @__PURE__ */ new Map(),
|
|
3014
3018
|
hiddenColumns: props.defaultHiddenColumns ?? /* @__PURE__ */ new Set(),
|
|
@@ -3697,7 +3701,7 @@ function SelectComponent({ itemId }) {
|
|
|
3697
3701
|
|
|
3698
3702
|
//#endregion
|
|
3699
3703
|
//#region src/components/row.tsx
|
|
3700
|
-
const Row = (0, react.memo)(function Row$1({ itemId, rowIndex }) {
|
|
3704
|
+
const Row = (0, react.memo)(function Row$1({ itemId, rowIndex, rowHeightsKey }) {
|
|
3701
3705
|
const table = useTableContext();
|
|
3702
3706
|
const divRef = (0, react.useRef)(null);
|
|
3703
3707
|
const detailsDivRef = (0, react.useRef)(null);
|
|
@@ -3744,7 +3748,8 @@ const Row = (0, react.memo)(function Row$1({ itemId, rowIndex }) {
|
|
|
3744
3748
|
table,
|
|
3745
3749
|
itemId,
|
|
3746
3750
|
divRef.current,
|
|
3747
|
-
detailsDivRef.current
|
|
3751
|
+
detailsDivRef.current,
|
|
3752
|
+
rowHeightsKey
|
|
3748
3753
|
]);
|
|
3749
3754
|
(0, react.useLayoutEffect)(() => {
|
|
3750
3755
|
table.getState().props.debugRender?.("render row", itemId);
|
|
@@ -3949,6 +3954,7 @@ const TableInner = (0, react.memo)(function TableInner$1({ hidden }) {
|
|
|
3949
3954
|
const enableColumnSelection = table.useState((state) => state.props.enableColumnSelection);
|
|
3950
3955
|
const enableExport = table.useState((state) => state.props.enableExport);
|
|
3951
3956
|
const cssVariables = useCssVariables();
|
|
3957
|
+
const rowHeightsKey = table.useState((state) => state.rowHeightsKey);
|
|
3952
3958
|
const enableClearFiltersButton = table.useState((state) => state.props.enableClearFiltersButton);
|
|
3953
3959
|
(0, react.useLayoutEffect)(() => {
|
|
3954
3960
|
table.getState().props.debugRender?.("render table inner");
|
|
@@ -4054,7 +4060,8 @@ const TableInner = (0, react.memo)(function TableInner$1({ hidden }) {
|
|
|
4054
4060
|
] })] }),
|
|
4055
4061
|
children: (itemIds, startIndex) => itemIds.map((itemId, index) => /* @__PURE__ */ (0, __emotion_react_jsx_runtime.jsx)(Row, {
|
|
4056
4062
|
itemId,
|
|
4057
|
-
rowIndex: startIndex + index
|
|
4063
|
+
rowIndex: startIndex + index,
|
|
4064
|
+
rowHeightsKey
|
|
4058
4065
|
}, itemId))
|
|
4059
4066
|
});
|
|
4060
4067
|
});
|