Skip to content

Adding support for select/clear all to multi-select field #180

Open
@jatinn

Description

Just found about this project and its making building an interactive cli tool so easy so thanks for that.

Is your feature request related to a problem? Please describe.
It would be great if there was a keyboard binding to be able to quickly select or clear all options for a multi-select field.
Ex. if i have 10 options and 2 are enabled by default and i want all of them i need to move to and toggle each of the other options.

Describe the solution you'd like
For my use case a simple setup with a keybinding so that a - select all and c - clear selections would be ideal.
With 2 bindings I would say that the select all is only be available if there is no limit set but clear all is always present.

Alternatively could have one keybinding that can be used for both selection & deselection. However I am not sure how this should work when you set a limit on the field.

Describe alternatives you've considered
N/A. Been thinking more about how to order the options and the enabled defaults to make it so that it does not feel annoying using the cli I'm building.

Additional context
I'll probably have a look into adding this support with 2 bindings, but just wanted to put this out there to hopefully get some validation, other ideas or possible edge cases to consider.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions