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/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;
@@ -234,6 +234,7 @@ function useTableStateStorage(table) {
234
234
  id
235
235
  } = persist;
236
236
  await storage.removeItem(storageName(id));
237
+ setIsHydrated(false);
237
238
  q.clear();
238
239
  });
239
240
  }