Hi @danyloh, what you are experiencing is a bit different than what is on the running thread, that one is a report of this happening without event handlers attached to the input, which our engineers are currently investigating.
In our case, the onChange event handler on the text input is making an update to the state variable the component is using as a data source. After the asynchronous function setValue
is done running (for each key pressed), the component re-renders because its Data source has changed. By the time it has rendered again, the user has typed more on it, which has fired the same function many more times. This endless cycle keeps running every time a key is pressed so there are too many async
functions fired.
Would adding await
fix this? Not really, because the user would have to press one key and wait for the function to end before being able to type another character.
The workaround that I recommend is using a second State variable that we update on change, and a button to run the stateVariable.setValue
only once, when the user is done changing the value of the input.