naive-ui
naive-ui copied to clipboard
Limit the number of selections for `NSelect`
The problem this function solves
For now, users can select as many as possible options in NSelect
, but sometimes, we want to limit the number of selections.
Expected API
Provide a prop max
, just like NUpload
.
You can limit it by drop value in on-update:value
Yeah, it should work, but it would be better if there were some visual effects. For example, options (except the selected ones) will be automatically disabled once the limit is reached, so that users can immediately know that they cannot select more options.
I agree with KeroZhai
This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem