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
We implemented a solution to prevent input overwrites due to the async handling of onChange. However, the same issue happens for other handlers (e.g. onKeyDown).
Proposed Actions
Generalize the solution. Instead of only applying the input solution when an onChange handler is present, always handle the input value this way.
The text was updated successfully, but these errors were encountered:
I'm not sure if this is true in browsers besides Chrome or if this is just a behavior of React, but for some reason, the only handler which accurately gets the current value of an input is onChange.
I can't remember where I read it, but I think this is a behavior of onChange. onChange is the only event that is guaranteed to get the correct value of an input when it changes.
I'm closing for now. This issue doesn't seem to come up in practice and I'm pretty sure I've seen this happen in other app where inputs are controlled by the backend so I'm not really sure it can be fixed. Can re-open if this problem rears its head again.
Current Situation
We implemented a solution to prevent input overwrites due to the async handling of
onChange
. However, the same issue happens for other handlers (e.g.onKeyDown
).Proposed Actions
Generalize the solution. Instead of only applying the input solution when an
onChange
handler is present, always handle the inputvalue
this way.The text was updated successfully, but these errors were encountered: