mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-29 04:25:52 +01:00
Guard folder dialog Enter submit while mutation is pending
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
9be0d1fec6
commit
87ec9833b5
1 file changed
+1
-1
@@ -479,7 +479,7 @@ export function FolderFormDialog({
|
||||
onChange={(event) => setName(event.target.value)}
|
||||
autoFocus
|
||||
onKeyDown={(event) => {
|
||||
if (event.key === "Enter" && name.trim()) onSubmit({ name: name.trim(), color });
|
||||
if (event.key === "Enter" && name.trim() && !pending) onSubmit({ name: name.trim(), color });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user