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
In this example, I have one checkbox in panel 1 that updates a state variable and uses it for the checked prop. It's shared with another checkbox outside just for demonstration purposes. The buttons below that will update the state value with false, true, and undefined. If you click the buttons with tab panel 1 open, it works as intended, however if you follow the steps, the checked prop won't update for the checkbox within the tab panel.
Set the state to true with tab panel 1 open
Switch to tab panel 2
Go back to tab panel 1
Click the undefined button
Observe the checkbox inside won't update, but the one outside will
Click the false button
Observe the checkboxes will both be unchecked
The text was updated successfully, but these errors were encountered:
Example: https://codesandbox.io/s/keen-shape-6x38g?file=/src/App.js
In this example, I have one checkbox in panel 1 that updates a state variable and uses it for the checked prop. It's shared with another checkbox outside just for demonstration purposes. The buttons below that will update the state value with false, true, and undefined. If you click the buttons with tab panel 1 open, it works as intended, however if you follow the steps, the checked prop won't update for the checkbox within the tab panel.
The text was updated successfully, but these errors were encountered: