I have a tabs component with multiple tabs inside it, and I have a checkbox component inside one of the tabs' content panels. Whenever I select/deselect the checkbox, all the content of that tab panel just disappears.
The same happens when I use a plain HTML checkbox, and also when I use the material-ui 'Toggle' component'. I haven't tested for other components yet.
@cynicaldevil do you have a demo or can I look into your source code?
@puranjayjain Where can I post a demo?
@cynicaldevil in a new github repo.
I've seen this happen as well. Calling event.stopPropagation() from inside the checkbox onCheck handler fixed the issue for me.
@brunor It works!!
Thanks a lot, I had been struggling with this issue for quite a while now. Any idea why does this happen, though?
I have the same issue with TextField component. If it's within the Tab, the onChange event on the TextField component will propagate till the Tabs component
I guess we must call event.stopPropagation() in any event inside the Tabs' content.
Most helpful comment
I've seen this happen as well. Calling event.stopPropagation() from inside the checkbox onCheck handler fixed the issue for me.