shentao / vue-multiselect

Universal select/multiselect/tagging component for Vue.js

Home Page:https://vue-multiselect.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue3 NoOptions slot not working

abab5601 opened this issue · comments

Issue Description

Followed the documentation but for some reason the noOptions slot isn't working. The text is not getting displayed

<template v-slot:noOptions="">New Text</template>

I edited the source code to print _ctx.$slots and it shows 'nooptions.' I can't make the slot name uppercase."

  • make sure you use the right name in the component like this:

image

  • you can write v-slot in two ways like this:

image

I wrote my Vue 3 code using the CDN approach. If I write the template in JavaScript, I can achieve the desired effect:

image

However, if I move the interface to HTML:

image

The result is not as expected. I believe it's because HTML is not case-sensitive.

Would using a kebab case approach work? like v-slot:no-options?
If not, please create a jsfiddle with the issue, so we can figure out what could be going on here

I have same problem, slot noOptions is ignored in all ways of declaring.

commented

Need repro link