File tree 3 files changed +5
-11
lines changed
3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -168,9 +168,7 @@ module.exports = {
168
168
// transform: undefined,
169
169
170
170
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
171
- // transformIgnorePatterns: [
172
- // "/node_modules/"
173
- // ],
171
+ transformIgnorePatterns : [ 'node_modules/(?!(js-var-type)/)' ] ,
174
172
175
173
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
176
174
// unmockedModulePathPatterns: undefined,
Original file line number Diff line number Diff line change 40
40
"eslint-plugin-react" : " ^7.21.3" ,
41
41
"eslint-plugin-react-hooks" : " ^4.1.2" ,
42
42
"jest" : " ^26.5.2" ,
43
- "js-var-type" : " ^0.2.3 " ,
43
+ "js-var-type" : " ^0.2.4 " ,
44
44
"lodash-es" : " ^4.17.15" ,
45
45
"prettier" : " ^2.1.2" ,
46
46
"prop-types" : " ^15.7.2" ,
55
55
"webpack-dev-server" : " ^3.11.0"
56
56
},
57
57
"peerDependencies" : {
58
- "js-var-type" : " ^0.2.1 " ,
58
+ "js-var-type" : " ^0.2.4 " ,
59
59
"lodash-es" : " ^4.17.15" ,
60
60
"prop-types" : " ^15.7.2" ,
61
61
"react" : " ^16.13.1" ,
Original file line number Diff line number Diff line change 1
1
import { useContext , useCallback } from 'react' ;
2
- import { isEmptyStringLike , isBoolean , isFunction } from 'js-var-type' ;
2
+ import { isEmptyStringLike , isBoolean } from 'js-var-type' ;
3
3
import { FormContext } from './form-helpers' ;
4
4
import { toDatetimeLocal , fromDatetimeLocal } from '../../utils/formatters' ;
5
5
6
- export function useFormControl ( name , type , hooks = { } ) {
6
+ export function useFormControl ( name , type ) {
7
7
const formState = useContext ( FormContext ) ;
8
8
9
9
function setValue ( value ) {
10
10
formState . update ( name , value ) ;
11
-
12
- if ( isFunction ( hooks . afterChange ) ) {
13
- hooks . afterChange ( value ) ;
14
- }
15
11
}
16
12
17
13
const register = useCallback (
You can’t perform that action at this time.
0 commit comments