Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoResult slot docs not correct #1720

Open
freezingjune opened this issue Sep 10, 2023 · 2 comments
Open

NoResult slot docs not correct #1720

freezingjune opened this issue Sep 10, 2023 · 2 comments
Labels

Comments

@freezingjune
Copy link

freezingjune commented Sep 10, 2023

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

<div class="me-3 d-flex gap-3">
  <div class="filter-group-select">
    <VueMultiselect
      v-model="selectedFilterGroups"
      :options="newGroupFilterOptions"
      :limit="1"
      group-select
      multiple
      group-values="options"
      group-label="name"
      placeholder="Filter by Group"
      label="name"
      track-by="id"
      openDirection="bottom"
      deselectLabel=""
      selectLabel=""
      selectGroupLabel="Select group"
      >
      <span slot="noResult">No Groups found.</span>
    </VueMultiselect>
  </div>
</div>

Expected behaviour

It should show "No Matches found."

Actual behaviour

It shows default text "No elements founds. Consider changing the search query."

@mattelen
Copy link
Collaborator

mmm. @freezingjune does this work using the v-slot attr? If so, we need to update the examples

https://v2.vuejs.org/v2/guide/components-slots.html#Named-Slots

https://vuejs.org/guide/components/slots.html#named-slots

@freezingjune
Copy link
Author

Ok, this worked. Thanks!

<template v-slot:noResult>
  <span>No Matches found.</span>
</template>

@mattelen mattelen added docs and removed question labels Sep 10, 2023
@mattelen mattelen changed the title NoResult slot not working NoResult slot docs not correct Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants