mui / mui/base-ui

[autocomplete] render list of items as empty result

Open
#2,933 3 comments 0 reactions 0 assignees View on GitHub
component: autocomplete docs
Dominant language
TypeScript
Stars
10.9k
Forks
543
Avg merge
1d 20h
Merged PRs (30d)
101

Description

# Feature request

## Summary

I'm building a command palette using ``, and I would like to be able to render some default list items when there's no search results. The key point is that I still want to render the `Empty` children as a `List` with `Items` so I can keep all the interactivity.

| Default | No search results |
|------------|----------|
| ![Default view](https://github.com/user-attachments/assets/16b8bf0f-ded9-4139-ab4e-03d4692ae6eb) | ![No search results view](https://github.com/user-attachments/assets/8a9abac1-2062-496a-b3ef-cb77cee88a59) |

## Motivation

Maybe it's not the most popular pattern, but there are a handful of real world examples like this. For reference, here's Raycast showing a list of default results when there's no match.

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.