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
Pre-selected value in list #57
Comments
I think this is a duplicate of #43? If so, I have implemented the behaviour in #56, and it is awaiting review. The @tmbo Is there a reason the |
Thank you @kiancross . Indeed it is a duplicate. I just didn't find it. Thanks for your answer. |
Right, yes I think we should point at the default value 👍 I don't think we should return a default value on keyboard interrupt, as it signals the user wants to abort / go back. I think there are two ways to define the selected value (either specifying a value for
|
I think a default value makes the most sense for the select element (and would coincide with the pointed at element in this case). So I guess the least effort would be to adapt your or, use the logic to set the pointed at element but remove the parameter and only use |
@tmbo Do you think it might be confusing that the same functionality is implemented using two differently named arguments ( |
well, I would say that the behaviour from a users perspective should be consistent for arguments that share the same name. so if we implement it in the way that,
|
@tmbo I think ideally:
This would leave us with:
However, this may break backwards compatibility for those already using the |
Breaking backwards compatibility for something broken doesn't seem like a big issue for me... this is more a fix than a new feature. I agree with @tmbo. |
I think there is no right or wrong here, both approaches would work. I'd go for the |
Thank you guys! |
how dos this get used? i think im doing something wrong in my app :(
throws an error
works fine if i remove the default but then it just selects the first item in the list by default (with me commenting out
thanks for the awesome library! |
@WilliamStam Haven't tested your particular example, but the line that says |
that does actually work, thank you! seems slightly counter intuitive tho in a way lol |
Hi. I'm sorry if this has already been answered before...And thank you for questionary btw.
Is it possible in a select to have a preselected option? I have found the default-settings but it doesn't behave the way I would expect.
Here
review
is the default, but the marker stays ontest
. And if the user hits enter he will selecttest
and notreview
.In my scenario I will cache the last environment the user worked on and let him hit enter next time, instead of having to select from the list each time.
The text was updated successfully, but these errors were encountered: