Skip to content

Commit

Permalink
fix: FormItem getValueProps warning (#23875)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed May 5, 2020
1 parent 5c8ffd4 commit 2a0df4f
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
Expand Up @@ -180,6 +180,7 @@ function FormItem(props: FormItemProps): React.ReactElement {
'colon',
'extra',
'getValueFromEvent',
'getValueProps',
'hasFeedback',
'help',
'htmlFor',
Expand Down
4 changes: 2 additions & 2 deletions components/form/__tests__/index.test.js
Expand Up @@ -695,10 +695,10 @@ describe('Form', () => {
expect(wrapper.find('.ant-form-item').last().hasClass('ant-form-item-with-help')).toBeFalsy();
});

it('no warning of initialValue', () => {
it('no warning of initialValue & getValueProps', () => {
mount(
<Form>
<Form.Item initialValue="bamboo">
<Form.Item initialValue="bamboo" getValueProps={() => null}>
<Input />
</Form.Item>
</Form>,
Expand Down

0 comments on commit 2a0df4f

Please sign in to comment.