@vryzel/file-next-ui 0.5.0 → 0.5.1

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/index.js CHANGED
@@ -2180,10 +2180,12 @@ function FileExplorerInner(props) {
2180
2180
  () => [...sourceFiles].sort((a, b) => compareFiles(a, b, sortKey, sortDir)),
2181
2181
  [sourceFiles, sortKey, sortDir]
2182
2182
  );
2183
+ const refreshSeen = useRef(refreshKey);
2183
2184
  useEffect(() => {
2184
- if (refreshKey === void 0) return;
2185
+ if (refreshKey === void 0 || refreshSeen.current === refreshKey) return;
2186
+ refreshSeen.current = refreshKey;
2185
2187
  void reload();
2186
- }, [refreshKey]);
2188
+ }, [refreshKey, reload]);
2187
2189
  const handleActivate = useCallback(
2188
2190
  (file) => {
2189
2191
  if (file.id === DRAFT_FOLDER_ID) return;