form
form copied to clipboard
onChange Fire before field value sets
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?
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