File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ interface FormHelpers {
17
17
helperText ?: string
18
18
}
19
19
20
- export function getFormHelpers < T > ( form : FormikContextType < T > , name : string ) : FormHelpers {
20
+ export const getFormHelpers = < T > ( form : FormikContextType < T > , name : string ) : FormHelpers => {
21
21
// getIn is a util function from Formik that gets at any depth of nesting, and is necessary for the types to work
22
22
const touched = getIn ( form . touched , name )
23
23
const errors = getIn ( form . errors , name )
@@ -29,9 +29,9 @@ export function getFormHelpers<T>(form: FormikContextType<T>, name: string): For
29
29
}
30
30
}
31
31
32
- export function onChangeTrimmed < T > ( form : FormikContextType < T > ) : ( event : ChangeEvent < HTMLInputElement > ) => void {
33
- return ( event : ChangeEvent < HTMLInputElement > ) : void => {
32
+ export const onChangeTrimmed =
33
+ < T > ( form : FormikContextType < T > ) =>
34
+ ( event : ChangeEvent < HTMLInputElement > ) : void => {
34
35
event . target . value = event . target . value . trim ( )
35
36
form . handleChange ( event )
36
37
}
37
- }
You can’t perform that action at this time.
0 commit comments