-
Notifications
You must be signed in to change notification settings - Fork 95
[MultiSelect] pass the #noResult slot to the underlying component #2533
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
Conversation
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
It was done on purpose. Do we really need to make that slot available? What other message do you want to put? :) |
it would be really helpful if we can change the #noResult message to a static message would not be too helpful in my opinion. |
That should then be fixed and covered by the library itself? |
@skjnldsv I feel like it's important to allow those using our MultiSelect to override this and set their own slot content. Alternative messages could be "Nothing found" or whatever text matching the app context (more than "no results"). By making this slot available we also allow conditional content in the slot.
@kiranparajuli589 Just to make sure we're on the same page: If we can override the #noResult slot, then you can define it like <template #noResult>
<span v-if="stillSearching">we're fetching for you</span>
<span v-else>sorry, no results</span>
</template> |
@eneiluj absolutely, |
I would argue against it, as I would say it's best to be consistent in the feedback messages, thing that usually devs are not great at. :) |
@skjnldsv I agree devs are not always putting consistent messages 😁. I still feel there is the need to be able to set the |
I think having at least the option to overwrite the message makes sense 👍 |
Moving milestone to 6.0, if needed, please consider a backport to stable5 after merge |
/backport to stable5 |
Pretty much all the slots are passed down to Vue-Multiselect except
noResult
which is hardcoded. This is a naive way to pass it down and keep the default value if not defined. Maybe there's a more elegant way.