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

Reset the prompt after selection #201

Open
gennaro-tedesco opened this issue Jan 29, 2022 · 0 comments
Open

Reset the prompt after selection #201

gennaro-tedesco opened this issue Jan 29, 2022 · 0 comments

Comments

@gennaro-tedesco
Copy link

I have a standard use case where the user is shown a promptui.Prompt and, upon validation of the query string, such string is passed onto promptui.Select to display a menu choice. Is it possible to "reset the selection" back to the initial prompt via keybinding without exiting (Ctrl-C), namely for the user to go be the search prompt to change their query? I see that keys can be overriden as per here - but I believe this does not really cover the case. Sorry if I have missed it somewhere in the documentation already and the question is trivial.

Likewise, is it possible to specify different keybinding to prompt an action after the selection (namely say that with enter the user is selecting action 1, with ctrl-v the user decides to select action2 and so forth)?

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

No branches or pull requests

1 participant