Don't force a radio set to have at least one button on on start

It felt like the right thing to do, but it shouldn't be necessary. There are
times where someone may actually want to have a radio set with no buttons
pushed to start with.
This commit is contained in:
Dave Pearson
2023-02-22 21:07:08 +00:00
parent 789e0511d2
commit 177aae6902

View File

@@ -48,13 +48,6 @@ class RadioSet(Container):
"""The buttons within the set."""
return self.query(RadioButton)
def on_mount(self) -> None:
"""Set up the radio group for use after the DOM is loaded."""
buttons = self._buttons
on_buttons = buttons.filter(".-on")
if buttons and not on_buttons:
buttons[0].value = True
class Changed(Message, bubble=True):
"""Posted when the pressed button in the set changes."""