skeleton icon indicating copy to clipboard operation
skeleton copied to clipboard

Autocomplete: hide popup on zero suggestions

Open MatthiasvB opened this issue 4 months ago • 4 comments

Describe the feature in detail (code, mocks, or screenshots encouraged)

Currently, the emptyState prop allows us to pass in some HTML to be displayed when no search results match. However, there are usecases where one may not only let the user choose between predefined options but also to provide custom content. In this case, it is annoying to still see "No Results found" or any similar content. I would want the autocomplete popup to simply disappear.

This could be implemented using a simple boolean flag hideOnNoSuggestions or, possibly allowing for even greater flexibility, by providing access to the currently available suggestions, allowing the developer to add custom styling (such as display: none).

What type of pull request would this be?

Enhancement

Provide relevant links or additional information.

No response

MatthiasvB avatar Oct 11 '24 21:10 MatthiasvB