Closed benoit-hocquet closed 3 years ago
Thanks for contributing!
Actually I consider it a bug on my part that the default value is shown at all when suggestOnly
is false. So in list mode.
Inquirer list mode does not show default value next to the question but selects it if it is in the list.
So I will be removing showing of (4) in this case.
When suggestOnly
is true it is in normal input
mode and it will be shown as normal, but that is a raw text input so it is fine.
Hello, first off, thanks you so much for your very good library. I'm having some minor troubles with default values.
Description
I have to make database searches with autocomplete for user. I want the autocomplete to return me an id, but to search by username, so I have to carry an object with {name, value}, which already works great.
The problem arises when I want to select a default user.
Code
The prompt shows the id, not the username (which is expected since I only entered the id as a default value, see code above, default:4).
Proposal
The default should be able to take an object with {value, name} keys so that prompt will be able to show the username instead of an ID.
Current behaviour
Expected behaviour