schummar-table 0.21.1 → 0.21.2
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/cjs/index.js +3 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +3 -2
- package/dist/es/index.js.map +1 -1
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -1571,13 +1571,14 @@ function useTableStateStorage(table) {
|
|
|
1571
1571
|
const data = parse(json);
|
|
1572
1572
|
(_b = (_a = table.getState().props).debug) == null ? void 0 : _b.call(_a, "load", json, data);
|
|
1573
1573
|
table.update((state) => {
|
|
1574
|
-
var _a2, _b2, _c, _d;
|
|
1574
|
+
var _a2, _b2, _c, _d, _e, _f;
|
|
1575
1575
|
for (const key of KEYS) {
|
|
1576
1576
|
if ((!include || include.includes(key)) && !(exclude == null ? void 0 : exclude.includes(key)) && key in data) {
|
|
1577
1577
|
if (key === "filterValues") {
|
|
1578
1578
|
for (const [id2, value] of data[key]) {
|
|
1579
1579
|
if (((_a2 = state.filters.get(id2)) == null ? void 0 : _a2.persist) ?? ((_b2 = state.filters.get(id2)) == null ? void 0 : _b2.value) === void 0) {
|
|
1580
1580
|
state.filterValues.set(id2, value);
|
|
1581
|
+
(_d = (_c = state.filters.get(id2)) == null ? void 0 : _c.onChange) == null ? void 0 : _d.call(_c, value);
|
|
1581
1582
|
}
|
|
1582
1583
|
}
|
|
1583
1584
|
} else {
|
|
@@ -1585,7 +1586,7 @@ function useTableStateStorage(table) {
|
|
|
1585
1586
|
if (state.props[key] !== void 0) {
|
|
1586
1587
|
continue;
|
|
1587
1588
|
}
|
|
1588
|
-
(
|
|
1589
|
+
(_f = (_e = state.props)[`on${key.slice(0, 1).toUpperCase() + key.slice(1)}Change`]) == null ? void 0 : _f.call(_e, data[key]);
|
|
1589
1590
|
}
|
|
1590
1591
|
state[key] = data[key];
|
|
1591
1592
|
}
|