Storing opened folders in URL to preserve opened folders after tagging.

This commit is contained in:
Roland 2023-04-10 12:27:55 -06:00
parent d9a737d46b
commit 4e85e2f3d7
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
4 changed files with 55 additions and 42 deletions

View file

@ -107,7 +107,7 @@ export function FileBrowser() {
useEffect(() => {
// Fetch files after tagging.
setCallbacks([fetchFiles]);
setCallbacks([() => fetchFiles(openFolders)]);
return () => setCallbacks(null);
}, []);

View file

@ -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>