Skip to content

Conversation

Madeorsk
Copy link
Contributor

@Madeorsk Madeorsk commented Aug 7, 2025

Problem

Customizing the label for creating a new choice in AutocompleteInput with more than just text is not possible without rewriting the whole component.

Solution

Accept a ReactNode in createLabel prop, and a function returning a ReactNode in createItemLabel prop.

How To Test

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

@Madeorsk Madeorsk added the WIP Work In Progress label Aug 7, 2025
@Madeorsk Madeorsk added RFR Ready For Review and removed WIP Work In Progress labels Aug 7, 2025
@Madeorsk Madeorsk marked this pull request as ready for review August 7, 2025 13:10
@Madeorsk Madeorsk force-pushed the support-react-node-as-create-label branch from 34b2b8a to 06f596d Compare August 7, 2025 14:02
@Madeorsk Madeorsk changed the base branch from master to next August 7, 2025 14:02
@fzaninotto fzaninotto merged commit 92f4881 into next Aug 12, 2025
15 checks passed
@fzaninotto fzaninotto deleted the support-react-node-as-create-label branch August 12, 2025 04:43
@fzaninotto fzaninotto added this to the 5.10.2 milestone Aug 12, 2025
@fzaninotto fzaninotto changed the title Support ReactNode as create label Add ability to use a ReactNode as create label in <AutocompleteInput> and <SelectInput> Aug 12, 2025
@slax57 slax57 modified the milestones: 5.10.2, 5.11.0 Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Development

Successfully merging this pull request may close these issues.

3 participants