Skip to content

[combobox][autocomplete] Document open requirement for the inline prop - #5069

Merged
atomiks merged 4 commits into
mui:masterfrom
atomiks:claude/angry-solomon-3da4e4
Jun 18, 2026
Merged

atomiks merged 4 commits into
mui:masterfrom
atomiks:claude/angry-solomon-3da4e4

Conversation

@atomiks

@atomiks atomiks commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Relates to #3966

What

Expands the JSDoc for the inline prop on Combobox.Root (and Autocomplete.Root, which shares AriaCombobox) to document the open control contract.

The previous description was a single line — "Whether the list is rendered inline without using the popup." — which left out the most important usage detail: once inline is set, the component no longer controls the list's visibility, so open must be supplied for the list to be considered visible. This is exactly the confusion raised in #3966 ("you would have to pass in open as true, for selection through keyboard to work correctly when inline. Is this expected behavior?").

New JSDoc:

Whether the list is rendered inline without using the component's own popup.

Specify open unconditionally in conjunction with this prop so the list is considered visible: <Combobox.Root inline open>

In a Combobox.Root > Dialog.Root composition, bind the Combobox's open and onOpenChange props to the Dialog's open and onOpenChange state instead so the component resets its transient state (filter query, highlighted item, and input value) when the dialog closes.

Why

With inline, the floating layer is forced open (open: inline ? true : open) so the list always renders, but the state-machine open is kept "real" so a surrounding container can drive the open/close lifecycle. Interactions like selecting an item still call setOpen(false), so leaving open uncontrolled lets the internal open state drift out of sync with the permanently-visible list. The two correct patterns are:

  • Standalone always-visible list: pin open (<Combobox.Root inline open>).
  • Container composition (Dialog): bind Combobox's open/onOpenChange to the Dialog's state, so the reset-on-close lifecycle fires when the dialog closes.

Docs-only / JSDoc change — no behavior change. Generated types.md for combobox and autocomplete were refreshed via pnpm docs:api.

@atomiks atomiks added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. component: combobox Changes related to the combobox component. labels Jun 18, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

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

commit: 18d0d6f

@code-infra-dashboard

code-infra-dashboard Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 1,180.20 ms -1.44 ms(-0.1%) | Renders: 78 (+0)

Test Duration Renders
Tabs mount (200 instances) 252.45 ms 🔺+49.15 ms(+24.2%) 4 (+0)
Combobox type — 500 items, narrows to ~11 (type "Row 25") 28.10 ms ▼-8.51 ms(-23.2%) 17 (+0)

12 tests within noise — details

Metric alarms

Test Metric Change
Tabs mount (200 instances) bench:paint 🔺 +64.66 ms

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

@netlify

netlify Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 18d0d6f
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a3399a0eb854000088688c7
😎 Deploy Preview https://deploy-preview-5069--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@atomiks
atomiks marked this pull request as ready for review June 18, 2026 04:11
@atomiks atomiks added the component: autocomplete Changes related to the autocomplete component. label Jun 18, 2026
@atomiks atomiks changed the title [combobox] Document open requirement for the inline prop [combobox][autocomplete] Document open requirement for the inline prop Jun 18, 2026
@atomiks
atomiks merged commit 2502524 into mui:master Jun 18, 2026
6 checks passed
@atomiks
atomiks deleted the claude/angry-solomon-3da4e4 branch June 18, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: autocomplete Changes related to the autocomplete component. component: combobox Changes related to the combobox component. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants