I am using dash_bootstrap_components and my controls are 2 dcc.Dropdowns, a dcc.DatePickerSingle, and one dbc.ButtonGroup with 12 dbc.Buttons. With help from chriddyp, I learned how to use dash.callback_context to determine what was the latest button pressed and store it in a hidden div so it is retained between callbacks. Everything works great however none of the 12 buttons appear as active.
Does anyone know the trick to be able to reset Active=True on the active button so this actually works like a ButtonGroup and doesn’t just look like one? Any redefinition of layout, which I presume is an unsupported practice anyway, clears the other elements. I have suggested repeatedly that Dash needs a ButtonGroup control that looks like X buttons but operates 100% like dcc.RadioItems (one always active). I know I can also use tabs or radioitems, but really want buttons.
3 posts - 2 participants






