Vue-select: How to disable the "no-options" slot ?

Created on 31 Mar 2018  路  3Comments  路  Source: sagalbot/vue-select

How to remove the no-options li field below which is displayed when the search input box is editable:
<li class="no-options">Sorry, no matching options.</li>

feature request

Most helpful comment

@cirokd It looks awful.
qwe
Maybe there's another way...

All 3 comments

You can use an empty slot, like so:

<v-select>
  <span slot="no-options"></span>
</v-select>

@cirokd It looks awful.
qwe
Maybe there's another way...

This will help _only if you have something else to display_, e.g. footer slot in my case.

But it can be removed with css by setting .vs__no-options to display none (and don't add the custom no-options slot). In case you were having trouble opening it with dev tools, here is the html.

<ul id="vs1__listbox" role="listbox" style class="vs__dropdown-menu>
  <li class="vs__no-options">Sorry, no matching options.</li>
</ul>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

lau-a picture lau-a  路  3Comments

NexoraSolutions picture NexoraSolutions  路  3Comments

ducdev picture ducdev  路  3Comments

twz915 picture twz915  路  3Comments

FrancescoMussi picture FrancescoMussi  路  3Comments