Closed PaulFarault closed 1 year ago
Use Case :
Result : the attribute is not modified
addendum : when i refresh another time, the modification is OK ^^'
You're right, the value is well actualized in the store but not showed. I'll investigate 👀
TL;DR @mdrutel this should work as expected now
The problem was that we are using uncontrolled form. When loading the page, the field is initialized using the defaultValue
which is not updated along with the state, even if the store is refreshed.
Ideally, we could use controlled form to update the field. This could be worked along with #164.
My solution was to initialize the defaultValue
with right value since the beginning. I did it by re-fetch the value from the server directly after a successful PUT operation.
Use case 1 :
Result : The attribute is modified
Use case 2 :
Result : The attribute is modified
Now it's all fine, variable values are well refreshed ^^
Fixes #169
Which issue(s) this PR fixes
Fixes #169
Additional comments
Agreements