Skip to content

[select] <Select.Root multiple> always has [data-filled=true], even when no options are selected #3610

@guisehn

Description

@guisehn

Bug report

Current behavior

When using the Select component with multiple selection enabled, data-filled is always set, even when no options are selected.

Image

Note: The screenshot above is from the documentation running locally, with the MultiSelectExample code changed to wrap the select in a <Field.Root> to get the data- attributes.

Expected behavior

When no options are selected, data-filled should be absent.

Base UI version

1.0.0

Which browser are you using?

Chrome 142

Which OS are you using?

macOS

Which assistive tech are you using (if applicable)?

N/A

Additional context

Select multiples have a default value of [] instead of null.

The code that sets filled checks for null only:

setFilled(value !== null);

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: selectChanges related to the select component.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions