fix: preserve warning in Gorm.Item (#25518)

This commit is contained in:
二货机器人 2020-07-08 23:43:26 +08:00 committed by GitHub
parent 71447da264
commit 24abadd994
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -210,6 +210,7 @@ function FormItem(props: FormItemProps): React.ReactElement {
'labelAlign',
'labelCol',
'normalize',
'preserve',
'required',
'validateFirst',
'validateStatus',

View File

@ -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(
<Form>
<Form.Item initialValue="bamboo" getValueProps={() => null}>
<Form.Item initialValue="bamboo" getValueProps={() => null} preserve={false}>
<Input />
</Form.Item>
</Form>,