Skip to content

[REQUEST] Examples for selecting from multiple options #156

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

Open
Adamtaranto opened this issue Dec 18, 2024 · 0 comments
Open

[REQUEST] Examples for selecting from multiple options #156

Adamtaranto opened this issue Dec 18, 2024 · 0 comments
Labels
Enhancement New feature or request

Comments

@Adamtaranto
Copy link

Describe the solution you'd like
I am looking for a widget that will allow me to set a list of options for a user to choose from, as well as to set a default option.

Case 1: Allow a single option to be selected.
i.e. a set of radio buttons, or a drop down list.
Provide a visual indication of which option is currently selected.
Returns selected arg as string.

Case 2: Allow multiple selections.
Collection of Checkboxes or toggles would work here.
Visual indication of which options are currently selected.
Deselect option on second click..
Returns one more selected args as a list of strings.

Describe alternatives you've considered
I've considered creating separate widgets for each of the possible options for each multi-choice input arg of my script. This makes it messy to enforce single option selection (see case 1).

Is this feature present in other TUI products?
Not sure.

@Adamtaranto Adamtaranto added the Enhancement New feature or request label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant