Skip to content
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

ToggleButtonSingle adds buttons twice #232

Open
mangecoeur opened this issue Aug 3, 2023 · 2 comments
Open

ToggleButtonSingle adds buttons twice #232

mangecoeur opened this issue Aug 3, 2023 · 2 comments

Comments

@mangecoeur
Copy link

If you use the example in the docs of setting custom buttons, the widget adds the buttons twice.

Line 87 in togglebuttons.py is

children = [solara.Button(label=str(value)) for value in values] + children

but should be

    if len(children) == 0:
        children = [solara.Button(label=str(value)) for value in values]
@iisakkirotko
Copy link
Collaborator

Hey @mangecoeur,

Are you sure you aren't adding the buttons twice, once through values=, and once through children=? It is sufficient to do one or the other. Or are you saying that in the case where both are supplied only one should be used?

@mangecoeur
Copy link
Author

Hey, yes it looks like i am both adding buttons and setting the values=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants