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
{{ message }}
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
I have an callback for onBlur that will setState, and based on the state, some buttons may be removed from the screen.
The problem is that one of these buttons has a callback that needs to run, and if setState is called from the onBlur callback, then the callback for the button does not run, probably because it's not technically visible. I verified that the button callback works fine if the onBlur callback does not call setState.
I worked around the issue by using a window.setTimout that calls setState after 250ms.
Is this the right approach?
Or is this a bug in flux that all callbacks don't run?
My expectation is that the all callbacks would run and the setState calls would be cummulative.
Thanks for any advice.
The text was updated successfully, but these errors were encountered:
I have an callback for onBlur that will setState, and based on the state,
some buttons may be removed from the screen.
The problem is that one of these buttons has a callback that needs to run,
and if setState is called from the onBlur callback, then the callback for
the button does not run, probably because it's not technically visible. I
verified that the button callback works fine if the onBlur callback does
not call setState.
I worked around the issue by using a window.setTimout that calls setState
after 250ms.
Is this the right approach?
Or is this a bug in flux that all callbacks don't run?
My expectation is that the all callbacks would run and the setState calls
would be cummulative.
Thanks for any advice.
—
Reply to this email directly or view it on GitHub #73.
I have an callback for onBlur that will setState, and based on the state, some buttons may be removed from the screen.
The problem is that one of these buttons has a callback that needs to run, and if setState is called from the onBlur callback, then the callback for the button does not run, probably because it's not technically visible. I verified that the button callback works fine if the onBlur callback does not call setState.
I worked around the issue by using a window.setTimout that calls setState after 250ms.
My expectation is that the all callbacks would run and the setState calls would be cummulative.
Thanks for any advice.
The text was updated successfully, but these errors were encountered: