vue-select icon indicating copy to clipboard operation
vue-select copied to clipboard

Stop selection from overflowing?

Open jamols09 opened this issue 3 years ago • 1 comments

How do I stop the selected option from overflowing. If I select more filter that will have a total of more than the fields width. Id like it to show on the placeholder "3 filters selected" or something like that

image

Or probably something like this will do image

jamols09 avatar Aug 23 '21 03:08 jamols09

Well you can control the wrapping via CSS. Notice that .v-select-bar has flex-wap: wrap applied.

There are multiple ways to achieve the design in the image depending on how ambitious you are about the end UX. For example you can use the slots for the tags and v-show to hide the extra ones. Or use CSS like:

.v-select-selected:nth-child(n+4) {
    display: none !important;
}

The idea of the component is to be hackable. So understanding the docs and the way it works is vital for unlocking its true potential.

desislavsd avatar Aug 29 '21 06:08 desislavsd