You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose to provide a consistent reliable way of handling concurrent state updates.
Why
At the moment some concurrent updates result into obsolete fields. That causes various unexpected behaviors.
How
Accumulate fieldChange during a certain period of time and handle all the accumulated payload at once. Con: That would mean an idle accumulation period, and "synced" patch state update.
Get at-point fields reference on form.handleChange. In other words, maybe add a second parameter to form.updateFieldsWith(fieldProps, fields) to have explicit fields passed.
This change is not going to affect the public API and thus can be released as a minor version.
The text was updated successfully, but these errors were encountered:
This issue results into numerous bugs, mainly connected to keeping controlled inputs in a form. This needs to be resolved. I will try to think of a possible solutions and pick the best at the moment.
I've summed it up in one of the pull requests, but I am going to repeat this here too:
The concurrency issue can be eliminated using a simple bufferTime during the event observation. That, however, bears no effect over the typing-based value updates of controlled fields. The issue lies in dispatching an event in Field.componentWillReceiveProps, which is a no-op. This may be a good reason to refine Form-Field communication pattern.
What
I propose to provide a consistent reliable way of handling concurrent state updates.
Why
At the moment some concurrent updates result into obsolete
fields
. That causes various unexpected behaviors.How
fieldChange
during a certain period of time and handle all the accumulated payload at once. Con: That would mean an idle accumulation period, and "synced" patch state update.fields
reference onform.handleChange
. In other words, maybe add a second parameter toform.updateFieldsWith(fieldProps, fields)
to have explicitfields
passed.The text was updated successfully, but these errors were encountered: