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

slot "noResult" is not working

Open ravipatel2293 opened this issue 6 years ago • 5 comments

hi, When I'm using "noResult" slot with ":taggable: "true" then it's not showing the template inside the noResult slot. I'm not sure why it's not working with taggable while in rest of the cases it works fine.

Can anyone have a workaround for this?

ravipatel2293 avatar May 13 '19 05:05 ravipatel2293

Is it showing default List is empty text?

If so, try using noOptions slot instead.

kyrsquir avatar Jan 08 '20 21:01 kyrsquir

this issue still exists

@ravipatel2293 Have you solve this issue?

sinau123 avatar Nov 30 '20 07:11 sinau123

As @kyrsquir said, i have used noOptions slot to achieve desired outcome.

ravipatel2293 avatar Nov 30 '20 08:11 ravipatel2293

<VueMultiselect v-model="departmans" :options="optionsdata" :multiple="true" group-values="libs" group-label="tumunusec" :group-select="true" placeholder="Type to search" track-by="isim" label="isim"><span slot="noResult">New text</span></VueMultiselect>

this is not working.

Ekran Resmi 2022-03-29 15 05 59

pasamsin avatar Mar 29 '22 12:03 pasamsin

I need to translate the content of "noResult" but it isnt working.

Spliterr avatar Jul 07 '22 00:07 Spliterr

I have the same problem. The slots noResult and noOptions do not seem overridable.

Edit: Using <i slot="noOptions">New Text</i>

worked just fine for me

CodeTappert avatar Aug 12 '22 09:08 CodeTappert

It looks like the original issue of the noResult slot not working has been 'fixed' by using noOptions instead.

@pasamsin To use a named slot, you will need to use a v-slot attribute, ideally on a template element, for example: <VueMultiselect> <template v-slot:noResult> <span>New Text</span> </template> </VueMultiselect> Feel free to check out this guide about how to use named slots: https://v2.vuejs.org/v2/guide/components-slots.html#Named-Slots

The other queries are a bit hard to troubleshoot and assist as there aren't many details to go on. I'm going to close this issue, but if anyone has more issues, feel free to open a new issue with a reproducible link - you can use this as a template: https://jsfiddle.net/mattelen/8cyt3hrn/3/

mattelen avatar Aug 19 '22 13:08 mattelen