@canvas-components/react-list-table 0.3.14 → 0.3.15

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.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { CSSProperties, ReactNode, ForwardedRef, PropsWithChildren } from 'react';
3
3
  import { ListTableOptions, ListTableQueryChange, ListTableExportXlsxOptions, ListTableScrollToOptions, ListTable, ListTableColumn, ListTablePaginationOptions, ListTableQueryOptions, ListTableRowSelectionOptions, EXPAND_COLUMN, SELECTION_COLUMN, ROW_SELECTION_COLUMN } from '@canvas-components/list-table';
4
- export { EXPAND_COLUMN, ROW_SELECTION_COLUMN, SELECTION_COLUMN } from '@canvas-components/list-table';
4
+ export { EXPAND_COLUMN, ROW_SELECTION_COLUMN, SELECTION_COLUMN, getListTableStoredPageSize } from '@canvas-components/list-table';
5
5
 
6
6
  interface ReactListTableScrollConfig {
7
7
  x?: number | string | true;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { CSSProperties, ReactNode, ForwardedRef, PropsWithChildren } from 'react';
3
3
  import { ListTableOptions, ListTableQueryChange, ListTableExportXlsxOptions, ListTableScrollToOptions, ListTable, ListTableColumn, ListTablePaginationOptions, ListTableQueryOptions, ListTableRowSelectionOptions, EXPAND_COLUMN, SELECTION_COLUMN, ROW_SELECTION_COLUMN } from '@canvas-components/list-table';
4
- export { EXPAND_COLUMN, ROW_SELECTION_COLUMN, SELECTION_COLUMN } from '@canvas-components/list-table';
4
+ export { EXPAND_COLUMN, ROW_SELECTION_COLUMN, SELECTION_COLUMN, getListTableStoredPageSize } from '@canvas-components/list-table';
5
5
 
6
6
  interface ReactListTableScrollConfig {
7
7
  x?: number | string | true;
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { createContext, forwardRef, useMemo, useRef, useState, useImperativeHand
2
2
  import { createPortal } from 'react-dom';
3
3
  import { ReactImagePreview, ReactNumberInput, ReactSelect, ReactPagination, ReactFilterPanel, ReactPopup, ReactModal, ReactInput, ReactPopconfirm, ReactContentScaleProvider, ReactInputNumber, ReactCheckbox, ReactAutoComplete, ReactColorPicker, ReactTimeRangePicker, ReactDateTimeRangePicker, ReactDateTimePicker, ReactTimePicker, ReactDateRangePicker, ReactDatePicker, ReactMonthPicker, ReactQuarterPicker, ReactYearPicker, ReactInputRange } from '@canvas-components/react-components';
4
4
  import { EXPAND_COLUMN, SELECTION_COLUMN, ROW_SELECTION_COLUMN, resetListTableStoredColumnConfig, ListTable } from '@canvas-components/list-table';
5
- export { EXPAND_COLUMN, ROW_SELECTION_COLUMN, SELECTION_COLUMN } from '@canvas-components/list-table';
5
+ export { EXPAND_COLUMN, ROW_SELECTION_COLUMN, SELECTION_COLUMN, getListTableStoredPageSize } from '@canvas-components/list-table';
6
6
  import { formatDateTimeValue, isDateTimeFormatPattern } from '@canvas-components/utils/date';
7
7
  import { formatNumberValue, formatPercentValue, formatScientificValue, formatCustomNumberPattern } from '@canvas-components/utils/number';
8
8
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -3914,6 +3914,7 @@ function ReactListTableInner(props, ref) {
3914
3914
  );
3915
3915
  const [columnConfig, setColumnConfig] = useState(() => /* @__PURE__ */ new Map());
3916
3916
  const [columnConfigRevision, setColumnConfigRevision] = useState(0);
3917
+ const [columnConfigResetRevision, setColumnConfigResetRevision] = useState(0);
3917
3918
  const resolvedColumns = useMemo(
3918
3919
  () => applyColumnManagerState(
3919
3920
  columns,
@@ -3979,6 +3980,7 @@ function ReactListTableInner(props, ref) {
3979
3980
  ...nextOptions,
3980
3981
  ...fullscreenSize,
3981
3982
  columnConfigRevision,
3983
+ columnConfigResetRevision,
3982
3984
  ui: {
3983
3985
  ...nextOptions.ui,
3984
3986
  onDensityChange: setDensityOverride
@@ -4021,7 +4023,8 @@ function ReactListTableInner(props, ref) {
4021
4023
  rowDrag,
4022
4024
  resolvedDebug,
4023
4025
  isFullscreen,
4024
- columnConfigRevision
4026
+ columnConfigRevision,
4027
+ columnConfigResetRevision
4025
4028
  ]);
4026
4029
  const {
4027
4030
  containerRef,
@@ -4147,6 +4150,7 @@ function ReactListTableInner(props, ref) {
4147
4150
  setColumnVisibility(/* @__PURE__ */ new Map());
4148
4151
  setColumnOrders(/* @__PURE__ */ new Map());
4149
4152
  setColumnConfig(/* @__PURE__ */ new Map());
4153
+ setColumnConfigResetRevision((current) => current + 1);
4150
4154
  setColumnConfigRevision((current) => current + 1);
4151
4155
  });
4152
4156
  }