@monolith-forensics/monolith-ui 1.2.4 → 1.2.6

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.
@@ -45,9 +45,7 @@ const TableMenu = () => {
45
45
  runSearch(value);
46
46
  }, 350);
47
47
  const handleSearch = (e) => {
48
- var _a, _b;
49
48
  debouncedSearch(e.target.value);
50
- (_b = (_a = tableMenuOptions === null || tableMenuOptions === void 0 ? void 0 : tableMenuOptions.searchOptions) === null || _a === void 0 ? void 0 : _a.onSearch) === null || _b === void 0 ? void 0 : _b.call(_a, e.target.value);
51
49
  };
52
50
  const handleSelectFilter = (item) => {
53
51
  var _a;
@@ -41,7 +41,7 @@ const TableProvider = (_a) => {
41
41
  return (stateStorage === null || stateStorage === void 0 ? void 0 : stateStorage.enabled)
42
42
  ? StateStorage.getTableState(stateStorage.key)
43
43
  : undefined;
44
- }, []);
44
+ }, [stateStorage === null || stateStorage === void 0 ? void 0 : stateStorage.key]);
45
45
  const { columnState: savedColumnState, selectionState: savedSelectionState, sortState: savedSortState, searchState: savedSearchState, filterState: savedFilterState, } = savedTableState || {};
46
46
  const [compactState, setCompactState] = useState(props.compact || false);
47
47
  const [columnState, setColumnState] = useState(syncColumnState(_columns, savedColumnState));
@@ -453,11 +453,13 @@ const TableProvider = (_a) => {
453
453
  });
454
454
  }, [sortState]);
455
455
  useEffect(() => {
456
+ var _a, _b, _c;
456
457
  if (stateStorage === null || stateStorage === void 0 ? void 0 : stateStorage.enabled) {
457
458
  if ((stateStorage === null || stateStorage === void 0 ? void 0 : stateStorage.type) === "localStorage") {
458
459
  StateStorage.setSearchState(stateStorage.key, search);
459
460
  }
460
461
  }
462
+ (_c = (_b = (_a = props.tableMenuOptions) === null || _a === void 0 ? void 0 : _a.searchOptions) === null || _b === void 0 ? void 0 : _b.onSearch) === null || _c === void 0 ? void 0 : _c.call(_b, search);
461
463
  }, [search]);
462
464
  useEffect(() => {
463
465
  if (stateStorage === null || stateStorage === void 0 ? void 0 : stateStorage.enabled) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",