Skip to content

feat: Added emptyText prop to SelectArrayInput #11231

Open
EvanPaules wants to merge 1 commit intomarmelab:nextfrom
EvanPaules:add-emptytext-selectarrayinput
Open

feat: Added emptyText prop to SelectArrayInput #11231
EvanPaules wants to merge 1 commit intomarmelab:nextfrom
EvanPaules:add-emptytext-selectarrayinput

Conversation

@EvanPaules
Copy link
Copy Markdown

Problem

SelectArrayInput has no way to display custom text when no items are selected. SelectInput already supports this via emptyText.

Solution

Add an emptyText prop to SelectArrayInput that displays when the selected array is empty. Supports both strings (with translation) and React elements.

How To Test

Run the EmptyText story in Storybook, or run yarn test-unit --testPathPattern="SelectArrayInput"

Additional Checks

  • The PR targets next for a feature
  • The PR includes unit tests
  • The PR includes one or several stories
  • The documentation is up to date

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant