From 1828e206e0311948307a640154d861f4e0a8f7c8 Mon Sep 17 00:00:00 2001 From: Sparsh Sharma Date: Wed, 14 Aug 2024 17:52:18 +0530 Subject: [PATCH 1/2] Added onpaste event/feature in tag --- src/components/input/input.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/input/input.tsx b/src/components/input/input.tsx index 6626f60eff..79cfdb4dbe 100644 --- a/src/components/input/input.tsx +++ b/src/components/input/input.tsx @@ -39,6 +39,7 @@ export type InputProps = Pick< | 'name' | 'onFocus' | 'onBlur' + | 'onPaste' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' @@ -164,6 +165,9 @@ export const Input = forwardRef((props, ref) => { checkValue() mergedProps.onBlur?.(e) }} + onPaste={e =>{ + mergedProps.onPaste?.(e) + }} id={mergedProps.id} placeholder={mergedProps.placeholder} disabled={mergedProps.disabled} From bed97f0b456609727ed7f688cea1f2f3b22a55ef Mon Sep 17 00:00:00 2001 From: Sparsh Sharma Date: Wed, 14 Aug 2024 20:24:39 +0530 Subject: [PATCH 2/2] Updated the onPaste event --- src/components/input/input.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/input/input.tsx b/src/components/input/input.tsx index 79cfdb4dbe..5b4c664074 100644 --- a/src/components/input/input.tsx +++ b/src/components/input/input.tsx @@ -165,9 +165,7 @@ export const Input = forwardRef((props, ref) => { checkValue() mergedProps.onBlur?.(e) }} - onPaste={e =>{ - mergedProps.onPaste?.(e) - }} + onPaste={mergedProps.onPaste} id={mergedProps.id} placeholder={mergedProps.placeholder} disabled={mergedProps.disabled}