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

Change the default no-options message #6352

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/components/NcSelect/NcSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,11 @@ export default {
<NcLoadingIcon v-if="spinner.loading" />
</template>
<template #no-options>
<!--
@slot Define the message when there are no options available.
Default : "No results"
@see https://vue-select.org/guide/slots.html#improving-the-default-no-options-text
-->
{{ t('No results') }}
</template>
Comment on lines +552 to 558
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the vue-styleguidist docs, this is not correct usage of @slots. There is no <slot> element it describes here.

It doesn't change anything in the generated documentation

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few lines below there is

<!-- @slot Any combination of slots from https://vue-select.org/api/slots.html -->

The only problem - vue-styleguidist takes variable name as a slot name, which might be not so obvious. But the text says "any of", and the link has the no-options slot as well as all the other slots.

<template v-for="(_, name) in $scopedSlots" #[name]="data">
Expand Down