schummar-table 0.51.1 → 0.51.3

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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as __export } from "./chunk-Bp6m_JJh.js";
2
- import { a as mergeThemes, c as throttle, i as globalTableTheme, l as Store, n as TableSettingsProvider, o as Popover, r as configureTableTheme, s as defaultClasses, t as TableSettingsContext, u as StoreScope } from "./tableSettings-ClxJL29H.js";
2
+ import { a as mergeThemes, c as throttle, i as globalTableTheme, l as Store, n as TableSettingsProvider, o as Popover, r as configureTableTheme, s as defaultClasses, t as TableSettingsContext, u as StoreScope } from "./tableSettings-CCjCl2iG.js";
3
3
  import "./csvExporter-CqTylAk9.js";
4
4
  import { Fragment, cloneElement, createContext, forwardRef, memo, useContext, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
5
5
  import { castDraft } from "immer";
@@ -2894,6 +2894,7 @@ function filterColumns(state) {
2894
2894
  ], ([columns, hiddenColumns, columnOrder, displaySize], draft) => {
2895
2895
  draft.activeColumns = orderBy(columns.filter((column) => !(column.hidden ?? hiddenColumns.has(column.id))), [(column) => columnOrder.indexOf(column.id)]);
2896
2896
  draft.visibleColumns = draft.activeColumns.filter((column) => displaySize === void 0 || column.displaySize === void 0 || column.displaySize.includes(displaySize));
2897
+ draft.rowHeights.clear();
2897
2898
  }, { runNow: true }), [state]);
2898
2899
  }
2899
2900
 
@@ -3561,7 +3562,9 @@ const Cell = memo(function Cell$1({ itemId, rowIndex }) {
3561
3562
  const wrapCell = table.useState((state) => state.props.wrapCell) ?? defaultWrapCell;
3562
3563
  const item = table.useState((state) => state.activeItemsById.get(itemId));
3563
3564
  const columnStyleOverride = table.useState((state) => state.columnStyleOverride.get(columnId), { throttle: 16 });
3564
- useLayoutEffect(() => table.getState().props.debugRender?.("render cell", itemId, columnId));
3565
+ useLayoutEffect(() => {
3566
+ table.getState().props.debugRender?.("render cell", itemId, columnId);
3567
+ });
3565
3568
  const className$2 = useTheme((t) => cx(...calcClassNames(t.classes, item?.value, rowIndex)));
3566
3569
  const styles = useTheme((t) => calcCss(t.styles, item?.value, rowIndex));
3567
3570
  if (!column || !item) return null;
@@ -3736,7 +3739,9 @@ const Row = memo(function Row$1({ itemId, rowIndex }) {
3736
3739
  divRef.current,
3737
3740
  detailsDivRef.current
3738
3741
  ]);
3739
- useLayoutEffect(() => table.getState().props.debugRender?.("render row", itemId));
3742
+ useLayoutEffect(() => {
3743
+ table.getState().props.debugRender?.("render row", itemId);
3744
+ });
3740
3745
  if (!item) return null;
3741
3746
  return /* @__PURE__ */ jsx(ClassNames, { children: ({ css: css$1, cx: cx$1 }) => /* @__PURE__ */ jsx(Fragment$1, { children: wrapRow({
3742
3747
  className: cx$1(css$1([subgrid ? {
@@ -3855,7 +3860,9 @@ function Virtualized({ header, footer, children,...props }) {
3855
3860
  };
3856
3861
  }, [update, virtual]);
3857
3862
  useEffect(() => update.cancel, [update]);
3858
- useLayoutEffect(() => table.getState().props.debugRender?.(`Virtualalized render ${from} to ${to}`));
3863
+ useLayoutEffect(() => {
3864
+ table.getState().props.debugRender?.(`Virtualized render ${from} to ${to}`);
3865
+ });
3859
3866
  return /* @__PURE__ */ jsxs("div", {
3860
3867
  ...props,
3861
3868
  children: [
@@ -3888,7 +3895,9 @@ function _Table(props, ref) {
3888
3895
  await clearStorage();
3889
3896
  resetState();
3890
3897
  }
3891
- useLayoutEffect(() => table.getState().props.debugRender?.("render table"));
3898
+ useLayoutEffect(() => {
3899
+ table.getState().props.debugRender?.("render table");
3900
+ });
3892
3901
  return /* @__PURE__ */ jsx(TableContext.Provider, {
3893
3902
  value: table,
3894
3903
  children: /* @__PURE__ */ jsx(TableResetContext.Provider, {
@@ -3934,7 +3943,9 @@ const TableInner = memo(function TableInner$1({ hidden }) {
3934
3943
  const enableExport = table.useState((state) => state.props.enableExport);
3935
3944
  const cssVariables = useCssVariables();
3936
3945
  const enableClearFiltersButton = table.useState((state) => state.props.enableClearFiltersButton);
3937
- useLayoutEffect(() => table.getState().props.debugRender?.("render table inner"));
3946
+ useLayoutEffect(() => {
3947
+ table.getState().props.debugRender?.("render table inner");
3948
+ });
3938
3949
  return /* @__PURE__ */ jsx(Virtualized, {
3939
3950
  className: classes?.table,
3940
3951
  css: [