Can we re-initialize initialValue on getfielddecorator ?
I have a form for viewing and updating. It was setup like this.
Form field's initialValue populated from database.
Edit button to enabled all fields.
Cancel button to call form.resetFields();
Save button to update.
My problem is on Save button, once the data is saved i need to update the initialValue to be equal to the updated from retrieved from database, but initialValue is not updated.
I can use form.setFieldsValue to populate form with the updated data, but when "Edit" is clicked, then click "Cancel", fields is reset and populated by the 1st initialValue (not updated data).
Can we re-initialize initialValue on getfielddecorator ?
I have a form for viewing and updating. It was setup like this.
My problem is on Save button, once the data is saved i need to update the initialValue to be equal to the updated from retrieved from database, but initialValue is not updated.
I can use form.setFieldsValue to populate form with the updated data, but when "Edit" is clicked, then click "Cancel", fields is reset and populated by the 1st initialValue (not updated data).