Skip to content

Conversation

@atomiks
Copy link
Contributor

@atomiks atomiks commented Oct 9, 2025

This pattern is used when searching for selectable items without loading them all upfront. In this case, the selected value needs to be retained in the items list at all times if present, as the internal logic removes selections if it disappears from the items list.

Preview: https://deploy-preview-2947--base-ui.netlify.app/react/components/combobox#async-search-single

@atomiks atomiks added docs Improvements or additions to the documentation. component: combobox Changes related to the combobox component. labels Oct 9, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 9, 2025

vite-css-base-ui-example

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@2947
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@2947

commit: f374fbd

@atomiks atomiks force-pushed the docs/async-combobox branch from 45dac30 to c933fee Compare October 9, 2025 10:51
@netlify
Copy link

netlify bot commented Oct 9, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit f374fbd
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69143c3abee7eb000805cc20
😎 Deploy Preview https://deploy-preview-2947--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mui-bot
Copy link

mui-bot commented Oct 9, 2025

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 🔺+135B(+0.03%) 🔺+34B(+0.03%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@atomiks atomiks force-pushed the docs/async-combobox branch from c933fee to 8ce974f Compare October 9, 2025 11:01
@atomiks atomiks force-pushed the docs/async-combobox branch from 8ce974f to e5874e6 Compare October 9, 2025 12:21
@atomiks atomiks changed the title [docs][combobox] Async search example [docs][combobox] Async search examples Oct 10, 2025
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 23, 2025
Signed-off-by: atomiks <cc.glows@gmail.com>
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 27, 2025
@atomiks atomiks force-pushed the docs/async-combobox branch from 91b2ed6 to e05794c Compare October 27, 2025 07:24
@atomiks atomiks marked this pull request as ready for review October 27, 2025 07:27
@atomiks atomiks force-pushed the docs/async-combobox branch 2 times, most recently from 5926c54 to 3046f7f Compare October 27, 2025 07:31
@atomiks atomiks force-pushed the docs/async-combobox branch from 3046f7f to d4e964c Compare November 3, 2025 01:21
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Nov 5, 2025
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Nov 6, 2025

### Async search (single)

Load items from a remote source by fetching on input changes. Keep the selected item in the `items` list so it remains available while new results stream in. This pattern avoids needing to load items upfront.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the selected item in the items list so it remains available while new results stream in

@atomiks This makes sense for multiple but for single selection it doesn't seem that useful? Once a (single) selection is made, you won't get new results without clearing/re-typing a new input value:

Screen.Recording.2025-11-11.at.11.24.08.PM.mov

Copy link
Contributor Author

@atomiks atomiks Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also needs to stay present in the list since otherwise the selection gets removed, and typically that only happens if the entire input is cleared from text (and matches non-async demos)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok that makes sense, I guess it's a bit confusing since the description is very similar to the async multiple one

@atomiks atomiks merged commit 0def33c into mui:master Nov 12, 2025
20 checks passed
@atomiks atomiks deleted the docs/async-combobox branch November 12, 2025 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: combobox Changes related to the combobox component. docs Improvements or additions to the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants