mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 16:06:19 -05:00
Storing opened folders in URL to preserve opened folders after tagging.
This commit is contained in:
parent
d9a737d46b
commit
4e85e2f3d7
4 changed files with 55 additions and 42 deletions
|
|
@ -107,7 +107,7 @@ export function FileBrowser() {
|
|||
|
||||
useEffect(() => {
|
||||
// Fetch files after tagging.
|
||||
setCallbacks([fetchFiles]);
|
||||
setCallbacks([() => fetchFiles(openFolders)]);
|
||||
|
||||
return () => setCallbacks(null);
|
||||
}, []);
|
||||
|
|
|
|||
|
|
@ -170,7 +170,10 @@ export function FilePreviewWrapper({children}) {
|
|||
}
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
const handleClose = (e) => {
|
||||
if (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
setPreviewModal(null);
|
||||
setPreviewFile(null);
|
||||
}
|
||||
|
|
@ -213,7 +216,7 @@ export function FilePreviewWrapper({children}) {
|
|||
setPreviewModal(<Modal closeIcon
|
||||
size='fullscreen'
|
||||
open={true}
|
||||
onClose={handleClose}
|
||||
onClose={e => handleClose(e)}
|
||||
>
|
||||
{content}
|
||||
<ModalActions>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue