-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
Feature Request
Pre-Selection for Fuzzy Multiselection Prompts
It would be very cool to be able to preselect items in a fuzzy multiselection either in place of the default option or as a new option entirely
Suggested Usage
choices = inquirer.fuzzy(
message="Please select",
multiselect=True,
choices=get_choices,
preselect=get_selections # or using the pre-existing `default` option instead
)I was thinking of replacing the default option because it currently seems misleading to me.
Possible Use-case
This can be used to save the state of the prompt for the user between prompts. As an example a pizza delivery service scenario:
- The user selects toppings for a pizza (via multiselection fuzzy prompt) and then continues to enter his/her address.
- The user changes his/her mind and wants to modify the toppings again so he/she goes back to the previous prompt.
- His/Her selections are still visible and can easily be modified without starting all over again.
And thank you for this cool project! :)
EDIT:
I just saw #2. Using an enabled key in the choices would of course be a valid other way of doing it
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels