Replies: 3 comments 2 replies
-
I just submitted one possible solution as #711 |
Beta Was this translation helpful? Give feedback.
2 replies
-
Any progress here? We also interested in this functionality. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm closing this discussion as I'm no longer interested in working on this feature. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's talk about
SelectionPrompt
in its simplest form e.g.User can use
Up
andDown
arrows to change selected item andSpacebar
orEnter
to confirm the selection.However in my application I'm missing an option to cancel the selection entirely e.g by pressing
Escape
key.As a workaround I'm adding a special item at the beginning or at the end of the list and I handle its selection in a special way.
However in longer lists this first requires user to get to the top or bottom of the list by pressing
Home
orEnd
key.I believe
Escape
key would be more convenient and most importantly it would help consumer code to be shorter and easier to understand.So I would like to add support for
Escape
key toSelectionPrompt
andMultiSelectionPrompt
.Basic idea is that prompt ends when user presses
Escape
key and it somehow indicates to the caller it was cancelled (e.g. by returningnull
, setting some new property totrue
, throwing some specific exception etc.).Is this a feature that you would be willing to merge to Spectre.Console?
Beta Was this translation helpful? Give feedback.
All reactions