Skip to content

Idea: emptyText could be a function for reactivity #150

Description

@tbremer

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`,
    
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions