vueform / multiselect

Vue 3 multiselect component with single select, multiselect and tagging options (+Tailwind CSS support).
https://vueform.com
MIT License
803 stars 149 forks source link

Slot is "grouplabel", but type is "groupLabel" #392

Closed nathanchase closed 7 months ago

nathanchase commented 8 months ago

Version

Description

When trying to use a template with Multiselect, like so:

<template #groupLabel="{ group }">
        <div class="multiselect-group-label">
          {{ group.label }}
        </div>
</template>

groupLabel does not work as a slot name, but the type is 'groupLabel':

(property) groupLabel: globalThis.VNode<RendererNode, RendererElement, {
    [key: string]: any;
}>[]

if I change it to grouplabel:

<template #grouplabel="{ group }">
        <div class="multiselect-group-label">
          {{ group.label }}
        </div>
</template>

it works, but it throws a type error:

Property 'grouplabel' does not exist on type '{ placeholder: VNode<RendererNode, RendererElement, { [key: string]: any; }>[]; afterlist: VNode<RendererNode, RendererElement, { ...; }>[]; ... 12 more ...; spinner: VNode<...>[]; }'. Did you mean 'groupLabel'?ts(2551)
Multiselect.d.ts(202, 5): 'groupLabel' is declared here.
adamberecz commented 7 months ago

Thanks for reporting the issue. Fixed in 2.6.7.