Closed huarse closed 5 years ago
Due to the nature of React, the field element initialization inside of FormItem will not occur in time for the later calls to this.field.getValues()
to return the desired values. For your use case I would suggest manually calling this.field.init(...)
at the top of the render function, setting the initValue
prop here instead of using the defaultValue
prop on the Input.
Component
Field
Reproduction link
https://riddle.alibaba-inc.com/riddles/1e271717
Steps to reproduce
具体表现见 Riddle
问题描述: