File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { useInjectFormItemContext } from '../form/FormItemContext';
19
19
import omit from '../_util/omit' ;
20
20
import useConfigInject from '../_util/hooks/useConfigInject' ;
21
21
import type { ChangeEvent , FocusEventHandler } from '../_util/EventInterface' ;
22
+ import { omitBy , isUndefined } from 'lodash-es' ;
22
23
23
24
export function fixControlledValue ( value : string | number ) {
24
25
if ( typeof value === 'undefined' || value === null ) {
@@ -309,7 +310,7 @@ export default defineComponent({
309
310
if ( ! inputProps . autofocus ) {
310
311
delete inputProps . autofocus ;
311
312
}
312
- const inputNode = < input { ...inputProps } /> ;
313
+ const inputNode = < input { ...omitBy ( inputProps , isUndefined ) } /> ;
313
314
return withDirectives ( inputNode as VNode , [ [ antInputDirective ] ] ) ;
314
315
} ;
315
316
You can’t perform that action at this time.
0 commit comments