fixed focusing on edit folder button when leaving create folder

This commit is contained in:
ronronscelestes 2022-06-07 17:34:07 +02:00
parent d613d6aa83
commit 964106d44a

View File

@ -118,7 +118,10 @@ export const MediaLibrary = () => {
const handleEditFolderClose = payload => {
setFolderToEdit(null);
toggleEditFolderDialog(payload);
currentFolderToEditRef.current.focus();
if (currentFolderToEditRef.current) {
currentFolderToEditRef.current.focus();
}
};
useFocusWhenNavigate();