Checkboxes within tab panel not unchecking when passed undefined
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 455
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 2
Description
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.
- 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction in the CodeSandbox at /src/App.js and trace how the checkbox behaves when its tab panel is hidden and shown again. Verify the state changes for true, undefined, and false; done means the checkbox inside the tab panel unchecks on undefined just like the checkbox outside it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100