Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search and label fields #755

Open
OpenTasteSG opened this issue May 17, 2024 · 1 comment
Open

search and label fields #755

OpenTasteSG opened this issue May 17, 2024 · 1 comment

Comments

@OpenTasteSG
Copy link

I believe search and label fields always use the name field of the item.

Is there a way to customise that?

Trying to use it for country phone code list.
eg. allow people to search for United States, but when use select it, I just want it to display US +1.

I know I can custom render the list item, but not sure if there is a custom render label .

@OpenTasteSG
Copy link
Author

Not sure if there is an easier way, managed to achieve using below

eg. item = {name : "United States", label : "US +1", value: "US +1"}
I used a under renderListItem to list, disable local search, and use make use of onChangeSearchText to search name.

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

No branches or pull requests

1 participant