My solution here was to use the tabs components, but in all the unintended ways I’m hoping this holds up
The only things I did noticed is that I have to explicitly give the tabs component a value=None
and this needs to also be updated whenever the options (tabs in this case) are dynamically re-populated.
That said, I feel this is a major gap in the dash-core-component
suite in terms of making powerful dashboards. That is, on a general level, there is no component that provides context to the n_click
and n_timestamp
of it’s children. The closest thing we have would be radio and checkboxes, but those are not pure containers in the sense that they cannot be styled whichever way you like.
I’ll also submit this as a feature request and link back for context. Hopefully this gets on the docket as I think it will be a valuable add on and would solve many similar community posts. Here are just a few that stuck out:
- Dynamic number of inputs and varying id's
- Dynamic number of inputs, how to put callbacks for each input
- Dynamic number of inputs based on anther input (not necessarily a fix, at least for my situation, but a better solution nonetheless)