We have a multi-select box for searching in our website. I have created a wise dynamic search phrase and I need to set it as the default text in vue-multiselect without actually selecting any item so user can complete the text.
How can I set a default search text for multi-select with no focus?
It is also a good idea if the "noResult slot" is be displayed in this case.
That might be hard as the search value is an internal value. A way I imagine it could be possible is to extend the multiselect and add an initialSearch prop. Along this, I would add this to the created lifecycle hook.
created () {
this.search = this.initialSearch
}
Let me know if this helps. :)
That is exactly what I need.
I really am grateful for your help.
Sincerely
@marjandejyab do you have an example for how you fixed this?
Hello @TomFranssen & @marjandejyab I am facing the same issue but I can't get the solution to work.
Could you share what you've done?
Thank you!
Anthony
this.$refs['your_multiselect_refs_name'].search = default_search_text
i do it like this
Hello @TomFranssen & @marjandejyab I am facing the same issue but I can't get the solution to work.
Could you share what you've done?Thank you!
Anthony
Most helpful comment
That is exactly what I need.
I really am grateful for your help.
Sincerely