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

How to hide popup if no results? #51

Open
holmesadrianh opened this issue Jul 13, 2021 · 3 comments
Open

How to hide popup if no results? #51

holmesadrianh opened this issue Jul 13, 2021 · 3 comments

Comments

@holmesadrianh
Copy link

There is not need to show "No results" to the user. If there are no results the popup does not need to display. Is there a way to close the menu when there are no results?

@arc-arnob
Copy link

Yes that would be very helpful

@arc-arnob
Copy link

@holmesadrianh btw did you find any way to do it?

@anatolykopyl
Copy link

Old thread, but for anyone in the future looking for a way, you can do it by specifying a named slot #no-result.

<Mentionable
  :keys="['@', '#']"
  :items="items"
  offset="6"
  insert-space
  @open="onOpen"
  @apply="onApply"
>
  <textarea
    v-model="text"
  />

  <template #no-result>
    <div style="display: none;" />
  </template>
</Mentionable>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants