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

Create a RadioSet-like interface for checkbox groups #2379

Closed
darrenburns opened this issue Apr 26, 2023 · 4 comments · Fixed by #2652
Closed

Create a RadioSet-like interface for checkbox groups #2379

darrenburns opened this issue Apr 26, 2023 · 4 comments · Fixed by #2652
Assignees
Labels
enhancement New feature or request Task

Comments

@darrenburns
Copy link
Member

When using checkboxes in forms, they often appear in groups. I want to be able to say, “given this CheckboxSet, which options are currently active?”

Right now, to find this out, we'd have to do some DOM querying and it doesn't feel very ergonomic to work with.

RadioSet has a nice interface, where I can basically query for the RadioSet widget and ask find out which one is selected without having to worry about how things are structured in the DOM.

I think they work well when standalone, treated as a boolean - but are a little unwieldy when you have groups of them.

@darrenburns
Copy link
Member Author

On further discussion, it may not even be a CheckboxSet we need. The problem is: we need a way of selecting multiple items from a list. The solution: 🤷

@willmcgugan
Copy link
Collaborator

An extension to OptionList feels like it would cover that use case.

@davep davep added enhancement New feature or request Task labels Apr 27, 2023
@davep
Copy link
Contributor

davep commented May 24, 2023

See also #2518.

@davep davep self-assigned this May 24, 2023
@davep davep linked a pull request May 25, 2023 that will close this issue
@github-actions
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants