FIX[UI]: Rename modal dialog fixes

This will be a standard "Prompt" widget

* ESC closes the dialog without changes
* Can copy/cut paste
This commit is contained in:
Nicolás Hatcher
2024-12-16 21:24:41 +01:00
parent ab3f9c276d
commit 0cd3470a97

View File

@@ -54,6 +54,8 @@ const SheetRenameDialog = (properties: SheetRenameDialogProps) => {
if (event.key === "Enter") {
properties.onNameChanged(name);
properties.onClose();
} else if (event.key === "Escape") {
properties.onClose();
}
}}
onChange={(event) => {
@@ -61,6 +63,8 @@ const SheetRenameDialog = (properties: SheetRenameDialogProps) => {
}}
spellCheck="false"
onPaste={(event) => event.stopPropagation()}
onCopy={(event) => event.stopPropagation()}
onCut={(event) => event.stopPropagation()}
/>
</StyledDialogContent>
<DialogFooter>