From 7290c140972b02e0a1431d7c44e5fa5a2512ef3f Mon Sep 17 00:00:00 2001 From: kasterra Date: Wed, 29 May 2024 18:40:38 +0900 Subject: [PATCH] feat : TextArea Tab character input --- app/components/Input/TextArea.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/components/Input/TextArea.tsx b/app/components/Input/TextArea.tsx index 7822fe3..63e9757 100644 --- a/app/components/Input/TextArea.tsx +++ b/app/components/Input/TextArea.tsx @@ -40,6 +40,12 @@ const TextArea = ({ width: width ? width : undefined, height: height ? height : undefined, }} + onKeyDown={(e) => { + if (e.key === "Tab") { + e.preventDefault(); + (e.currentTarget as HTMLTextAreaElement).value += "\t"; + } + }} /> {description?.length && ( {description}