ant-design/ant-design
View on GitHubTag suggestion renderer in Select component with mode="tags"
Open
#51600 opened on Nov 13, 2024
Inactivehelp wanted
Description
What problem does this feature solve?
It can be difficult for the user to understand that the suggested value in the dropdown that will turn in to a tag when selected is not a pre-populated value but rather is based on what they typed. While developers have the ability to customize Options, we could use the ability to customize that one Option specifically to help distinguish it.
What does the proposed API look like?
I would like to propose a new prop on the Select component tagOptionRender which would essentially be the same as optionRender (same interface) but specifically for that new tag option.
For example, this would allow the developer to be able to convert something like "new tag" into "Create new tag..." using:
tagOptionRender={(value: string)=>`Create ${value}...`}