diff --git a/components/form/FormItem.tsx b/components/form/FormItem.tsx index 317e265cce42..5328de88460c 100644 --- a/components/form/FormItem.tsx +++ b/components/form/FormItem.tsx @@ -210,6 +210,7 @@ function FormItem(props: FormItemProps): React.ReactElement { 'labelAlign', 'labelCol', 'normalize', + 'preserve', 'required', 'validateFirst', 'validateStatus', diff --git a/components/form/__tests__/index.test.js b/components/form/__tests__/index.test.js index 62afa6caf941..158496c3f178 100644 --- a/components/form/__tests__/index.test.js +++ b/components/form/__tests__/index.test.js @@ -563,10 +563,10 @@ describe('Form', () => { expect(wrapper.find('.ant-form-item').last().hasClass('ant-form-item-with-help')).toBeFalsy(); }); - it('no warning of initialValue & getValueProps', () => { + it('no warning of initialValue & getValueProps & preserve', () => { mount(
- null}> + null} preserve={false}> ,