form icon indicating copy to clipboard operation
form copied to clipboard

onChange Fire before field value sets

Open marklai1998 opened this issue 7 years ago • 1 comments

My code needs a feature that calc the percentage complete of EACH SECTION so each section has their own onChange to handle the percentage

but when I fire it always get the previous value of that field My code is like: onChange () => this.props.form.getFieldValue(key)

I suspect the onChange Fire before field value sets, so I always get the previous value how can I get this right?

marklai1998 avatar Oct 18 '18 14:10 marklai1998

I'm trying option.onFieldsChange, but it accepts a static function which cannot set the state of the React element I also don't want to use redux yet

marklai1998 avatar Oct 18 '18 15:10 marklai1998