@monolith-forensics/monolith-ui 1.3.39 → 1.3.41

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.
@@ -124,7 +124,7 @@ const TableProvider = (_a) => {
124
124
  };
125
125
  if ((sortState === null || sortState === void 0 ? void 0 : sortState.dataField) === column.dataField) {
126
126
  if (sortState.dir === "desc") {
127
- newSortState = null;
127
+ newSortState = undefined;
128
128
  }
129
129
  else {
130
130
  if (newSortState) {
@@ -136,15 +136,15 @@ const TableProvider = (_a) => {
136
136
  updateSortState(newSortState);
137
137
  }
138
138
  else {
139
- (_b = props.onColumnHeaderClick) === null || _b === void 0 ? void 0 : _b.call(props, { column, sort: null });
140
- updateSortState(null);
139
+ (_b = props.onColumnHeaderClick) === null || _b === void 0 ? void 0 : _b.call(props, { column, sort: undefined });
140
+ updateSortState(undefined);
141
141
  }
142
142
  };
143
143
  const handleFilterChange = (query) => {
144
144
  setFilterState(query);
145
145
  if (stateStorage === null || stateStorage === void 0 ? void 0 : stateStorage.enabled) {
146
146
  if ((stateStorage === null || stateStorage === void 0 ? void 0 : stateStorage.type) === "localStorage") {
147
- StateStorage.setFilterState(stateStorage.key, filterState);
147
+ StateStorage.setFilterState(stateStorage.key, query);
148
148
  }
149
149
  }
150
150
  };
@@ -535,6 +535,20 @@ const TableProvider = (_a) => {
535
535
  clearSelections,
536
536
  runSearch,
537
537
  clearSearch,
538
+ getTableState: () => {
539
+ return {
540
+ columnState,
541
+ selectionState: {
542
+ selectedRowKeys,
543
+ excludedRowKeys,
544
+ selectionStatus,
545
+ totalSelected: getCalculatedSelectionTotal(),
546
+ },
547
+ sortState,
548
+ searchState: search,
549
+ filterState,
550
+ };
551
+ },
538
552
  };
539
553
  }
540
554
  const _data = useMemo(() => {
@@ -340,4 +340,5 @@ export type TableInstance = {
340
340
  runSearch: (query: string) => void;
341
341
  clearSearch: () => void;
342
342
  clearSelections: () => void;
343
+ getTableState: () => TableState;
343
344
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.3.39",
3
+ "version": "1.3.41",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",