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

Group options label instead of all the selected children

Open GMolini opened this issue 4 years ago • 2 comments

Is it possible to display the group label, instead of the selected children? for example, in the docs sample https://vue-multiselect.js.org/#sub-option-groups If I click on 'Javascript' I would like to have 'Javascript' displayed on the select box, and not 'Vue.js' and 'Adonis' Thanks!

GMolini avatar Feb 04 '21 12:02 GMolini

Yes. Use the #selection template

<template #selection>
        {{ selectionText }} <!-- this is a computed property -->
</template>

adrianmiu avatar Sep 17 '21 17:09 adrianmiu

@adrianmiu Could show an example. Thanks.

dima-bzz avatar Sep 23 '21 07:09 dima-bzz

@GMolini We can do it with current version but is very complex.

Please check https://codesandbox.io/s/vue-multiselect-show-group-insteadof-option-iqs3mk

We will try to to make it smooth in future release.

akki-jat avatar Oct 29 '22 19:10 akki-jat