mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
Ensure filter is only applied to the last path
This commit is contained in:
1 file changed
+11
-2
@@ -419,8 +419,17 @@ export function createStorageExplorerState({
|
||||
},
|
||||
|
||||
refetchAllOpenedFolders: async () => {
|
||||
const paths = state.openedFolders.map((folder) => folder.name)
|
||||
await state.fetchFoldersByPath({ paths, searchString: state.itemSearchString })
|
||||
if (state.itemSearchString) {
|
||||
const paths = state.openedFolders.map((folder) => folder.name)
|
||||
await state.fetchFoldersByPath({ paths: paths.slice(0, -1) })
|
||||
await state.fetchFoldersByPath({
|
||||
paths: [paths[paths.length - 1]],
|
||||
searchString: state.itemSearchString,
|
||||
})
|
||||
} else {
|
||||
const paths = state.openedFolders.map((folder) => folder.name)
|
||||
await state.fetchFoldersByPath({ paths })
|
||||
}
|
||||
},
|
||||
|
||||
refreshAll: async () => {
|
||||
|
||||
Reference in new issue
Block a user