Limit the number of items to show in the input field. If not set will show all selected. #4500
Unanswered
BasirBaidya
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Greetings @BasirBaidya , Converting this to a discussion since this does not appear to be an issue with the library. This appears to be a similar question to this: #3856 I think the best way to approach this is to filter the available options provided to the Select. This way you could avoid using styling or more custom components const selectedVals = values.map(x => x.value);
const hiddenOptions = selectedVals.length > 3 ? selectedVals.slice(0, 3) : [];
const options = colourOptions.filter(x => !hiddenOptions.includes(x.value))
return <Select options={options} .../> Please let me know if this is what you are looking for |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, How can I
itemsShowLimit
Limit the number of items to show in the input field. If not set will show all selected?Beta Was this translation helpful? Give feedback.
All reactions