mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
fix: FormItem getValueProps warning (#23875)
This commit is contained in:
parent
5c8ffd473b
commit
2a0df4f465
@ -180,6 +180,7 @@ function FormItem(props: FormItemProps): React.ReactElement {
|
|||||||
'colon',
|
'colon',
|
||||||
'extra',
|
'extra',
|
||||||
'getValueFromEvent',
|
'getValueFromEvent',
|
||||||
|
'getValueProps',
|
||||||
'hasFeedback',
|
'hasFeedback',
|
||||||
'help',
|
'help',
|
||||||
'htmlFor',
|
'htmlFor',
|
||||||
|
@ -695,10 +695,10 @@ describe('Form', () => {
|
|||||||
expect(wrapper.find('.ant-form-item').last().hasClass('ant-form-item-with-help')).toBeFalsy();
|
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(
|
mount(
|
||||||
<Form>
|
<Form>
|
||||||
<Form.Item initialValue="bamboo">
|
<Form.Item initialValue="bamboo" getValueProps={() => null}>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>,
|
</Form>,
|
||||||
|
Loading…
Reference in New Issue
Block a user