Skip to content

Commit c649c42

Browse files
committed
fix: focus issue with custom input
1 parent 25e00ab commit c649c42

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Shared/Components/CustomInput/CustomInput.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ const CustomInput = ({
6969
props.onChange(event)
7070
}
7171
}
72-
if (typeof onBlur === 'function') {
73-
onBlur(event)
74-
}
72+
onBlur?.(event)
7573
}
7674

7775
const handleKeyDown: InputHTMLAttributes<HTMLInputElement>['onKeyDown'] = (event) => {
@@ -84,6 +82,7 @@ const CustomInput = ({
8482

8583
const handleEndIconButtonClick: CustomInputProps['endIconButtonConfig']['onClick'] = (event) => {
8684
event.stopPropagation()
85+
inputRef.current.focus()
8786
endIconButtonConfig?.onClick(event)
8887
}
8988

0 commit comments

Comments
 (0)