File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export const CustomInput = ({
37
37
rootClassName = '' ,
38
38
autoComplete = 'off' ,
39
39
helperText = '' ,
40
- handleOnBlur ,
40
+ onBlur ,
41
41
readOnly = false ,
42
42
noTrim = false ,
43
43
onKeyPress,
@@ -66,15 +66,15 @@ export const CustomInput = ({
66
66
return error
67
67
}
68
68
69
- const onBlur = ( event ) => {
69
+ const handleOnBlur = ( event ) => {
70
70
// NOTE: This is to prevent the input from being trimmed when the user do not want to trim the input
71
71
if ( ! noTrim ) {
72
72
event . stopPropagation ( )
73
73
event . target . value = event . target . value ?. trim ( )
74
74
onChange ( event )
75
75
}
76
- if ( typeof handleOnBlur === 'function' ) {
77
- handleOnBlur ( event )
76
+ if ( typeof onBlur === 'function' ) {
77
+ onBlur ( event )
78
78
}
79
79
}
80
80
@@ -127,7 +127,7 @@ export const CustomInput = ({
127
127
e . persist ( )
128
128
onChange ( e )
129
129
} }
130
- onBlur = { onBlur }
130
+ onBlur = { handleOnBlur }
131
131
onFocus = { onFocus }
132
132
placeholder = { placeholder }
133
133
value = { value }
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export interface CustomInputProps {
34
34
rootClassName ?: string
35
35
error ?: string [ ] | string
36
36
helperText ?: ReactNode
37
- handleOnBlur ?: ( e ) => void
37
+ onBlur ?: ( e ) => void
38
38
readOnly ?: boolean
39
39
noTrim ?: boolean
40
40
onKeyPress ?: ( e ) => void
You can’t perform that action at this time.
0 commit comments