Skip to content

feat: Add placeholder prop to <SelectArrayInput> - #11327

Open
erwanMarmelab wants to merge 3 commits into
nextfrom
feat/next/add-placeholder-prop-to-SelectArrayInput
Open

feat: Add placeholder prop to <SelectArrayInput>#11327
erwanMarmelab wants to merge 3 commits into
nextfrom
feat/next/add-placeholder-prop-to-SelectArrayInput

Conversation

@erwanMarmelab

Copy link
Copy Markdown
Contributor

Closes #10454.

Problem

<SelectArrayInput> cannot render a custom text when no choice is selected (e.g. "All Channels" in a filter).

Solution

Add a placeholder prop, rendered in place of the chips while the value is empty.

How To Test

http://localhost:9010/?path=/story/ra-ui-materialui-input-selectarrayinput--placeholder

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@erwanMarmelab erwanMarmelab added the RFR Ready For Review label Jul 29, 2026
@erwanMarmelab
erwanMarmelab requested a review from pysnooLab July 29, 2026 16:00
@fzaninotto

Copy link
Copy Markdown
Member

I think this PR adds another feature than the one requested in #10454.

  • emptyText, as used in SelectInput and AutocompleteInput, adds an option in the dropdown for the empty value
  • placeholder, as you implemented it, renders an element in the input when nothing is selected.

By the way the story you added is backwards: the placeholder says "all selected" when in reality it should be "none"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants