schummar-table 0.14.2 → 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 CHANGED
@@ -171,7 +171,7 @@ function useTableStateStorage(table) {
171
171
  return () => {
172
172
  isCanceled = true;
173
173
  };
174
- }, []);
174
+ }, [table]);
175
175
  react.useEffect(() => {
176
176
  if (!isHydrated)
177
177
  return;
@@ -224,7 +224,7 @@ function useTableStateStorage(table) {
224
224
  }, {
225
225
  throttle: 1e3
226
226
  });
227
- }, [isHydrated]);
227
+ }, [table, isHydrated]);
228
228
  async function clear() {
229
229
  await q.run(async () => {
230
230
  const persist = table.getState().props.persist;
@@ -236,6 +236,7 @@ function useTableStateStorage(table) {
236
236
  id
237
237
  } = persist;
238
238
  await storage.removeItem(storageName(id));
239
+ setIsHydrated(false);
239
240
  q.clear();
240
241
  });
241
242
  }