Skip to content

Select - do not display the whole JSX of item in the button #5225

Closed Answered by reidbarber
andreasCampeon asked this question in Q&A
Discussion options

You must be logged in to vote

The Advanced Customization section of the docs is useful for cases like this.

Here is your example updated to show just text when an item is selected: https://codesandbox.io/s/clever-elion-cwy3c2?file=/src/App.js

Note that putting links inside select options isn't valid ARIA since there is no way to access the links via keyboard.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@devongovett
Comment options

@andreasCampeon
Comment options

Answer selected by reidbarber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants