From f826bff5490fb0ce0093c8b14b7c0ba65191fda4 Mon Sep 17 00:00:00 2001 From: Alan Fernandez Date: Sat, 28 Dec 2024 22:20:40 +0100 Subject: [PATCH] fix: cleanup on select folder --- src/components/dialog/folder-selection-dialog.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/dialog/folder-selection-dialog.tsx b/src/components/dialog/folder-selection-dialog.tsx index d1acda2..afe6ecd 100644 --- a/src/components/dialog/folder-selection-dialog.tsx +++ b/src/components/dialog/folder-selection-dialog.tsx @@ -63,6 +63,13 @@ export const FolderSelectionDialog: React.FC = ({ setNewFolderName('') } + const handleSelectFolder = (folderId: number) => { + setIsCreatingNewFolder(false) + setValidationError(false) + if (setNewFolderName) setNewFolderName('') + onFolderSelect(folderId) + } + return ( = ({ onFolderSelect(folder.id)}> + onPress={() => handleSelectFolder(folder.id)}> {folder.folderName}