From 106a6928d4358e085bd1e1ef7d21a41d5a8ab69e Mon Sep 17 00:00:00 2001 From: Vincent Audebert Date: Wed, 23 Oct 2024 17:50:11 +0200 Subject: [PATCH 1/3] fix(textinput): onKeyUp/Down not forwarded --- packages/form/src/components/TextInputFieldV2/index.tsx | 4 ++++ packages/ui/src/components/TextInputV2/index.tsx | 3 +++ 2 files changed, 7 insertions(+) diff --git a/packages/form/src/components/TextInputFieldV2/index.tsx b/packages/form/src/components/TextInputFieldV2/index.tsx index c553703c87..aab3cc79e5 100644 --- a/packages/form/src/components/TextInputFieldV2/index.tsx +++ b/packages/form/src/components/TextInputFieldV2/index.tsx @@ -61,6 +61,8 @@ export const TextInputField = < role, 'aria-live': ariaLive, 'aria-atomic': ariaAtomic, + onKeyDown, + onKeyUp, }: TextInputFieldProps) => { const { getError } = useErrors() @@ -142,6 +144,8 @@ export const TextInputField = < role={role} aria-live={ariaLive} aria-atomic={ariaAtomic} + onKeyDown={onKeyDown} + onKeyUp={onKeyUp} /> ) } diff --git a/packages/ui/src/components/TextInputV2/index.tsx b/packages/ui/src/components/TextInputV2/index.tsx index 0e50b54794..1ccb84c2c7 100644 --- a/packages/ui/src/components/TextInputV2/index.tsx +++ b/packages/ui/src/components/TextInputV2/index.tsx @@ -179,6 +179,7 @@ type TextInputProps = { | 'tabIndex' | 'autoComplete' | 'onKeyDown' + | 'onKeyUp' | 'role' | 'aria-live' | 'aria-atomic' @@ -227,6 +228,7 @@ export const TextInputV2 = forwardRef( 'aria-label': ariaLabel, autoComplete, onKeyDown, + onKeyUp, role, 'aria-live': ariaLive, 'aria-atomic': ariaAtomic, @@ -354,6 +356,7 @@ export const TextInputV2 = forwardRef( autoComplete={autoComplete} required={required} onKeyDown={onKeyDown} + onKeyUp={onKeyUp} /> {success || error || loading || computedClearable ? ( From cf65c5a345261b06ec5f936bd200f1927adfadae Mon Sep 17 00:00:00 2001 From: Vincent Audebert Date: Wed, 23 Oct 2024 18:04:15 +0200 Subject: [PATCH 2/3] fix: changeset --- .changeset/gorgeous-plants-reflect.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/gorgeous-plants-reflect.md diff --git a/.changeset/gorgeous-plants-reflect.md b/.changeset/gorgeous-plants-reflect.md new file mode 100644 index 0000000000..02441b5a01 --- /dev/null +++ b/.changeset/gorgeous-plants-reflect.md @@ -0,0 +1,6 @@ +--- +"@ultraviolet/form": patch +"@ultraviolet/ui": patch +--- + +fix(textinput): onKeyUp/Down not forwarded From 2488e1a113e2941a5607b7423a57880e60948dec Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 28 Oct 2024 09:55:21 +0100 Subject: [PATCH 3/3] Update .changeset/gorgeous-plants-reflect.md Co-authored-by: Matthias Prost --- .changeset/gorgeous-plants-reflect.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/gorgeous-plants-reflect.md b/.changeset/gorgeous-plants-reflect.md index 02441b5a01..b1fd4451c6 100644 --- a/.changeset/gorgeous-plants-reflect.md +++ b/.changeset/gorgeous-plants-reflect.md @@ -3,4 +3,4 @@ "@ultraviolet/ui": patch --- -fix(textinput): onKeyUp/Down not forwarded +Fix onKeyUp/Down not forwarded