File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
packages/jaeger-ui/src/utils Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ exports[`reduxFormFieldAdapter not validated input should render as expected 1`]
1010 " error" : null ,
1111 }
1212 }
13- onBlur = { null }
13+ onBlur = { [ Function ] }
1414 onChange = { [Function ]}
15- onFocus = { null }
15+ onFocus = { [ Function ] }
1616 prefixCls = " ant-input"
1717 type = " text"
1818 value = " inputValue"
@@ -46,6 +46,7 @@ exports[`reduxFormFieldAdapter validate input should render Popover as invisible
4646 }
4747 onBlur = { [Function ]}
4848 onChange = { [Function ]}
49+ onFocus = { [Function ]}
4950 prefixCls = " ant-input"
5051 type = " text"
5152 value = " inputValue"
@@ -80,6 +81,7 @@ exports[`reduxFormFieldAdapter validate input should render Popover as visible i
8081 }
8182 onBlur = { [Function ]}
8283 onChange = { [Function ]}
84+ onFocus = { [Function ]}
8385 prefixCls = " ant-input"
8486 type = " text"
8587 value = " inputValue"
@@ -109,6 +111,7 @@ exports[`reduxFormFieldAdapter validate input should render as expected when the
109111 }
110112 onBlur = { [Function ]}
111113 onChange = { [Function ]}
114+ onFocus = { [Function ]}
112115 prefixCls = " ant-input"
113116 type = " text"
114117 value = " inputValue"
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ import * as React from 'react';
2020
2121import './redux-form-field-adapter.css' ;
2222
23+ const noop = ( ) => { } ;
24+
2325export default function reduxFormFieldAdapter ( {
2426 AntInputComponent,
2527 onChangeAdapter,
@@ -38,8 +40,8 @@ export default function reduxFormFieldAdapter({
3840 'is-invalid' : isInvalid ,
3941 'AdaptedReduxFormField--isValidatedInput' : isValidatedInput ,
4042 } ) }
41- onBlur = { isValidatedInput ? onBlur : null }
42- onFocus = { isValidatedInput ? onFocus : null }
43+ onBlur = { isValidatedInput && onBlur ? onBlur : noop }
44+ onFocus = { isValidatedInput && onFocus ? onFocus : noop }
4345 onChange = { onChangeAdapter ? ( ...args ) => onChange ( onChangeAdapter ( ...args ) ) : onChange }
4446 value = { value }
4547 { ...rest }
You can’t perform that action at this time.
0 commit comments