Skip to content

[combobox] Expose clear visibility state - #4664

Merged
atomiks merged 3 commits into
mui:masterfrom
atomiks:codex/combobox-clear-visible-state
Apr 26, 2026
Merged

atomiks merged 3 commits into
mui:masterfrom
atomiks:codex/combobox-clear-visible-state

Conversation

@atomiks

@atomiks atomiks commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Closes #4652

Combobox.Clear did not expose a stable visibility signal for keepMounted compositions, so consumers could keep the button mounted but had no simple way to style its hidden state. This exposes the same visibility boolean the clear button already uses for mounting and transitions as state.visible and data-visible, which keeps the API narrow without implying field-control state on the button.

Changes

  • Add visible to the Combobox.Clear and Autocomplete.Clear state surface.
  • Expose data-visible on the clear button and document the new contract.
  • Add regression coverage for popup-contained and keepMounted clear button compositions.

@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 Apr 22, 2026 — with ChatGPT Codex Connector
@pkg-pr-new

pkg-pr-new Bot commented Apr 22, 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@4664
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@4664
    

commit: 74ac344

@code-infra-dashboard

code-infra-dashboard Bot commented Apr 22, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+10B(0.00%) 🔺+6B(0.00%)

Details of bundle changes

Performance

Total duration: 1,401.29 ms 🔺+57.03 ms(+4.2%) | Renders: 53 (+0) | Paint: 2,159.18 ms +75.79 ms(+3.6%)

Test Duration Renders
Menu mount (300 instances) 164.99 ms 🔺+32.07 ms(+24.1%) 2 (+0)
Tabs mount (200 instances) 271.65 ms 🔺+26.64 ms(+10.9%) 4 (+0)
Select mount (200 instances) 165.35 ms 🔺+23.18 ms(+16.3%) 3 (+0)
Menu open (500 items) 88.25 ms 🔺+19.44 ms(+28.2%) 12 (+0)
Mixed surface mount (app-like density) 109.39 ms 🔺+17.31 ms(+18.8%) 5 (+0)

...and 7 more. View full report

Details of benchmark changes


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

@netlify

netlify Bot commented Apr 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 74ac344
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69eea2ebf130de000861fb03
😎 Deploy Preview https://deploy-preview-4664--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.

@atomiks
atomiks marked this pull request as ready for review April 22, 2026 13:35
@atomiks
atomiks merged commit f028c91 into mui:master Apr 26, 2026
7 checks passed
@atomiks
atomiks deleted the codex/combobox-clear-visible-state branch April 26, 2026 23:49
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. 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.

[combobox] Get access to internal state for the Combobox.Clear component

3 participants