fix(dashboard): Allow using enter key to create newline in Textarea (#9913)

* fix(dashboard):Allow using enter key to create newline in Textarea

* update scheam file
This commit is contained in:
Kasper Fabricius Kristensen authored and GitHub committed 2024-11-05 08:54:28 +01:00
1 parent c0368cca28
commit d19d7a66ff
5 files changed
+45 -8

No files matched your search

@@ -14,6 +14,13 @@ export const KeyboundForm = React.forwardRef<
const handleKeyDown = (event: React.KeyboardEvent<HTMLFormElement>) => {
if (event.key === "Enter") {
if (
event.target instanceof HTMLTextAreaElement &&
!(event.metaKey || event.ctrlKey)
) {
return
}
event.preventDefault()
if (event.metaKey || event.ctrlKey) {