From 24abadd994f7468f7352578ad1c5df0aee992272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Wed, 8 Jul 2020 23:43:26 +0800 Subject: [PATCH] fix: preserve warning in Gorm.Item (#25518) --- components/form/FormItem.tsx | 1 + components/form/__tests__/index.test.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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}> ,