Skip to content

[select] POC: items array API #2082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

michaldudak
Copy link
Member

@michaldudak michaldudak commented Jun 9, 2025

@michaldudak michaldudak added component: select proof of concept Studying and/or experimenting with a to-be-validated approach labels Jun 9, 2025
Copy link

pkg-pr-new bot commented Jun 9, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@base-ui-components/react@2082

commit: f2aafb1

@mui-bot
Copy link

mui-bot commented Jun 9, 2025

Bundle size report

Bundle size will be reported once CircleCI build #107859 finishes.

Generated by 🚫 dangerJS against f2aafb1

Copy link

netlify bot commented Jun 9, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit f2aafb1
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/684868856a6b75000879eb4b
😎 Deploy Preview https://deploy-preview-2082--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.


export default function Experiment() {
return (
<Select.Root defaultValue="item-42" items={items}>
Copy link
Contributor

Choose a reason for hiding this comment

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

item-42 isn't being selected initially (when opening the popup there's no selection, then when closing, the value becomes blank)

@atomiks
Copy link
Contributor

atomiks commented Jun 9, 2025

How do you create groups?

@michaldudak
Copy link
Member Author

michaldudak commented Jun 9, 2025

How do you create groups?

You can't yet, but I'm planning to make the Select.Root accept objects in shape of:

{
  group: string;
  disabled?: boolean;
  items: SelectOption[];
}

@michaldudak
Copy link
Member Author

Added support for groups. Also moved the templates under Popup, closer to where they're actually rendered.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select PR: out-of-date The pull request has merge conflicts and can't be merged proof of concept Studying and/or experimenting with a to-be-validated approach
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants