Skip to content

Not possible to show nothing if no items match in Autocomplete #3966

@peterbe

Description

@peterbe

The use case is when you use <Autocomplete> to allow a user to ignore all the suggestions but still proceed merrily. For example, for site-search. The input widget can suggest possible search term completions that match what's been input so far, but the user types beyond any of the suggestions and submits the form to make a full site-search.

If you set <Autocomplete.Menu emptyStateText={false} .../> (or null or undefined), this happens:

Autocomplete widget in action showing nothing

Earlier in the typing, when suggestions could be presented, it looked like this:

Autocomplete widget in action showing something

But, case in point, if the user ignores the fact that there exists no good autocomplete suggestion, completing the input does yield plenty of good site-search results:

Sample of search results listed

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions