Closed brandonjpierce closed 7 years ago
Try lastest release 0.11.0, it should behave like the normal text input in this regard.
I saw your comment on email. The reason for putting it behind the flag is because in suggestOnly mode it behaves like the input prompt. With the flag off it behaves like the list prompt. And the list prompt does not apply the filter for the ui. I will change it if it gets changed in inquirer itself.
But maybe you saw that and deleted the comment?
@mokkabonna Yeah I misunderstood the default behavior of inquirer, your implementation of filtering the value when in suggestOnly
mode is correct!
Hello, me again :D
So the recent filter update you made works great, thanks again for adding that! In default
inquirer
prompts, if you supply a filter, that filter value will become the answer in the UI.I've provided a gif to make it easier to explain what I mean. Notice the default
input
type prompt's display answer is converted toab
even thoughabc123
was entered. However in the autocompleteprompt
the answer value is not changed even though a filter is supplied. The filter for both prompts is simply:answer.slice(0, 2)
.