Skip to content

Commit

Permalink
fix: preserve warning in Gorm.Item (ant-design#25518)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored Jul 8, 2020
1 parent 71447da commit 24abadd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/form/FormItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ function FormItem(props: FormItemProps): React.ReactElement {
'labelAlign',
'labelCol',
'normalize',
'preserve',
'required',
'validateFirst',
'validateStatus',
Expand Down
4 changes: 2 additions & 2 deletions components/form/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down

0 comments on commit 24abadd

Please sign in to comment.