Ensure filter is only applied to the last path

This commit is contained in:
Gildas Garcia committed 2026-10-02 11:03:50 +02:00
1 parent 5ca961d3b9
commit ae249158ab
1 file changed
+11 -2
+11 -2
View File
@@ -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 () => {