-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
How to disable the "no-options" slot ? #497
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
Comments
You can use an empty slot, like so: <v-select>
<span slot="no-options"></span>
</v-select> |
@cirokd It looks awful. |
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 <ul id="vs1__listbox" role="listbox" style class="vs__dropdown-menu>
<li class="vs__no-options">Sorry, no matching options.</li>
</ul> |
I am actually experiencing the same issue now. What I did is like this:
And then via CSS:
This works for me! (at least for the meantime) |
How to show no-options slot only when you actually search something:
and methods:
|
@sagalbot , first of all, thank you for your work! maybe there is some update about this request? |
It worked in my context. I'm using this component with NcSelect from Nextcloud. I wrote this code, and it worked, but I wonder if it's best practice to use this component in this way 🤔 <NcSelect
class="searchbar-groups"
track-by="gid"
label="displayName"
:limit="10"
:options="groupsSelectable"
:placeholder="t('workspace', 'Start typing text to search for groups')"
:loading="loadingGroups"
:append-to-body="false"
:user-select="true"
@option:selected="addGroupToBatch"
@search="lookupGroups"
@close="groupsSelectable=[]">
<template #no-options>
<span />
</template>
</NcSelect> |
Uh oh!
There was an error while loading. Please reload this page.
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>
The text was updated successfully, but these errors were encountered: