You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Happy to make a PR, but wanted to make sure you'd be interested.
I'd love to see the emptyText option expand to be either a function, a string, or undefined. This would enable some level of reactivity for that portion of the prompt.
Example: I have a list of items, but a user is allowed to create unique items (with suggestOnly: true option), instead of printing No results... I could print a more useful message, such as: Add "searchTerm" to database.
in code example:
{…
emptyText: (searchTerm)=>`Add ${searchTerm} to database`,…}
The text was updated successfully, but these errors were encountered:
Sure that could be useful, if you decide to do it you should also add it for searchText then at the same time I think.
And the function should probably receive the same input as the source function: answers and input.
That way you can construct even more dynamic text based on earlier input.
Happy to make a PR, but wanted to make sure you'd be interested.
I'd love to see the
emptyText
option expand to be either a function, a string, or undefined. This would enable some level of reactivity for that portion of the prompt.Example: I have a list of items, but a user is allowed to create unique items (with
suggestOnly: true
option), instead of printingNo results...
I could print a more useful message, such as:Add "searchTerm" to database.
in code example:
The text was updated successfully, but these errors were encountered: