-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ManagerRadio unchecked all #344
Comments
Tishka17
added
bug
Something isn't working
widget
New widget request, or some widget fixes
labels
Dec 26, 2023
but it working on latest develop async def get_data(**_kwargs):
fruits = [
("Apple", '1'),
("Pear", '2'),
("Orange", '3'),
("Banana", '4'),
]
return {
"fruits": fruits,
"count": len(fruits),
}
fruits_kbd = Radio(
Format("🔘 {item[0]}"), # E.g `🔘 Apple`
Format("⚪️ {item[0]}"),
id="r_fruits",
item_id_getter=operator.itemgetter(1),
items="fruits",
)
async def remove_selection(call: CallbackQuery, _widget, manager: DialogManager):
widget: ManagedRadio = manager.find("r_fruits")
await widget.set_checked(None)
await call.answer()
main_window = Window(
"Radio!",
fruits_kbd,
Button(Const("Radio!"), id="remove_selection", on_click=remove_selection),
state=MySG.main,
getter=get_data,
) when i press button all buttons in radio stop being active |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can't set ManagedRadio's state when none of the buttons are active, passing None to the set_checked method doesn't work
The text was updated successfully, but these errors were encountered: