Black Lives Matter. Please consider donating to Black Girls Code today.

dbc.InputGroup radiobuttons selection

I want to use dbc.InputGroup for building a dynamic table of rows which should be selectable with radiobuttons. I want the same behaviour as with dcc.RadioItem: Only one radiobutton selected at any time. Can’t figure out how to do that with dbc.InputGroup though.

My understanding was that Bootstrap radiobuttons should have a property ‘name’ for grouping them together.

But this doesn’t work -dbc.RadioButton has no argument ‘name’:

 dbc.InputGroup(
    [
        dbc.InputGroupAddon(dbc.RadioButton(name='group1'), addon_type="prepend"),
        dbc.Label('Item A'),
    ],
),
dbc.InputGroup(
    [
        dbc.InputGroupAddon(dbc.RadioButton(name='group1'), addon_type="prepend"),
        dbc.Label('Item B'),
    ]
),

Since the table will be dynamically generated I don’t want to resort to using callbacks for each individual radiobutton.