mirror of
https://github.com/cloudreve/frontend.git
synced 2025-12-25 19:52:48 +00:00
fix(explorer): refresh file list if newly created file is a nested path (cloudreve/cloudreve#2853)
This commit is contained in:
parent
35961604a1
commit
64b34b280f
|
|
@ -1030,6 +1030,12 @@ export function submitCreateNew(index: number, name: string, type: number): AppT
|
|||
}),
|
||||
);
|
||||
|
||||
// if name does not contain "/", append cache
|
||||
if (name.includes("/")) {
|
||||
dispatch(refreshFileList(index));
|
||||
return newFile;
|
||||
}
|
||||
|
||||
const newList = fm.list?.files ? [...fm.list.files, newFile] : [newFile];
|
||||
if (newList) {
|
||||
dispatch(setFileList({ index: FileManagerIndex.main, value: newList }));
|
||||
|
|
|
|||
Loading…
Reference in New Issue