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 configure vue-instant to display suggestions that do not match the query? #53

Open
paul0id opened this issue May 17, 2019 · 2 comments

Comments

@paul0id
Copy link

paul0id commented May 17, 2019

I use the your wonderful component and everything in it is good, only when an array of "suggestions" comes from the back-end, vue-instant shows only those that strictly match the query.

That is, if I enter "Mosk" - I see "Moscow", and if I introduce "Moks" - then I will not see anything, although the answer from the server will come from "Moscow" and I passed it through the "suggestions" parameter.

How to make him withdraw everything that I give him?

@Staferot
Copy link

Staferot commented May 23, 2019

Just create other block for the notify about it and show block when you get empty query result.

Like this:

<div id="app">
  <label>Some label</label>
  <vue-instant :suggestions="suggestions" [...other props...]></vue-instant>
  <div v-if="!suggestions.length" class="empty-suggestions">Empty result</div>
</div>

@paul0id
Copy link
Author

paul0id commented May 30, 2019

Thanks for the answer. But that is not the question.
I need the component to output all the results I received from the backend.

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

2 participants