Skip to content

[select] block opening the popup when provided readOnly - #2717

Merged
atomiks merged 3 commits into
mui:masterfrom
seongminn:select-trigger-readonly
Sep 11, 2025
Merged

atomiks merged 3 commits into
mui:masterfrom
seongminn:select-trigger-readonly

Conversation

@seongminn

Copy link
Copy Markdown
Contributor

Fixes #2715

@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2025 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: c865ae4

@mui-bot

mui-bot commented Sep 10, 2025 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react ▼-64B(-0.02%) ▼-36B(-0.03%)

Details of bundle changes

@netlify

netlify Bot commented Sep 10, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit c865ae4
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/68c263dbb52f7b0008eaee5d
😎 Deploy Preview https://deploy-preview-2717--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.


keyboardActiveRef.current = true;

if (event.key === 'ArrowDown') {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this code block actually exist - is there a test covering it? useListNavigation should handle the logic already

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That makes sense. It's clear now that the logic in onKeyDown is redundant since it's covered by useListNavigation.

I have one follow-up question, though. Am I correct in thinking that the keyboardActiveRef is still necessary to track keyboard activity?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah; it should just be the if (...) block that's redundant.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Did it here. Thank you for your feedback!

@atomiks atomiks added component: select Changes related to the select component. type: bug It doesn't behave as expected. labels Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: select Changes related to the select component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[select] readOnly Behavior in the Select Component

3 participants