schummar-table 0.14.0 → 0.14.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/cjs/index.js +8 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +8 -9
- package/dist/es/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -169,7 +169,7 @@ function useTableStateStorage(table) {
|
|
|
169
169
|
return () => {
|
|
170
170
|
isCanceled = true;
|
|
171
171
|
};
|
|
172
|
-
}, []);
|
|
172
|
+
}, [table]);
|
|
173
173
|
useEffect(() => {
|
|
174
174
|
if (!isHydrated)
|
|
175
175
|
return;
|
|
@@ -222,7 +222,7 @@ function useTableStateStorage(table) {
|
|
|
222
222
|
}, {
|
|
223
223
|
throttle: 1e3
|
|
224
224
|
});
|
|
225
|
-
}, [isHydrated]);
|
|
225
|
+
}, [table, isHydrated]);
|
|
226
226
|
async function clear() {
|
|
227
227
|
await q.run(async () => {
|
|
228
228
|
const persist = table.getState().props.persist;
|
|
@@ -230,14 +230,11 @@ function useTableStateStorage(table) {
|
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
232
|
const {
|
|
233
|
-
storage
|
|
233
|
+
storage,
|
|
234
|
+
id
|
|
234
235
|
} = persist;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
if (key !== null) {
|
|
238
|
-
await storage.removeItem(key);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
236
|
+
await storage.removeItem(storageName(id));
|
|
237
|
+
setIsHydrated(false);
|
|
241
238
|
q.clear();
|
|
242
239
|
});
|
|
243
240
|
}
|
|
@@ -3437,6 +3434,8 @@ export {
|
|
|
3437
3434
|
startOfDay,
|
|
3438
3435
|
termMatch,
|
|
3439
3436
|
textMatch,
|
|
3437
|
+
thisWeek,
|
|
3438
|
+
today,
|
|
3440
3439
|
useColumnContext,
|
|
3441
3440
|
useFilter,
|
|
3442
3441
|
useTableContext,
|