Troubleshooting Searchbox Widget in Vue3
TLDR Trey needed help with setting up the searchbox widget in Vue3. Jason suggested using vue-instantsearch instead of instantsearch.js.
Powered by Struct AI
3
13mo
Solved
Aug 23, 2022 (13 months ago)
Trey
Trey
03:00 PMHi everyone. im trying to get an autocomplete implementation setup in vue3, but am running into some issues with the searchbox widget. I cant seem to set the container no matter what I try and I can't find a solution anywhere. If I set the widget like this:
I get
and if i try to pass in the query selector like this:
I get
If anyone has seen this type of error or can point me in the right direction, i would really appreciate it
search.addWidgets([
searchBox({
container: '#searchbox'
}),
I get
Uncaught (in promise) Error: Container must be string or HTMLElement. Unable to find #searchbox
and if i try to pass in the query selector like this:
search.addWidgets([
searchBox({
container: document.querySelector('#searchbox')
}),
I get
Uncaught (in promise) Error: The container option is required.
If anyone has seen this type of error or can point me in the right direction, i would really appreciate it
Jason
Jason
04:22 PM Trey If you’re using vue, you want to use vue-instantsearch instead of instantsearch.js
04:23
Jason
04:23 PMThe syntax in your code snippets is for instantsearch.js
Typesense
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI
Indexed 2764 threads (79% resolved)
Similar Threads
Resolving Typesense Setup Issues with VueJS
A sought help with setting up Typesense in a CDN VueJS application. Jason guided him to adjust the initialization and provided a solution to an undefined item warning, resulting in a successful setup.



87
26mo
Solved
Bug Found in InstantSearch Widget's Operator
em1nos noted a possible bug with the InstantSearch widget's default operator. Jason confirmed the bug and promptly issued a fix, to which em1nos confirmed the resolution.



17
26mo
Solved
Issues with Search UI for Vector Search
WL is building a search UI for vector search and having issues with syntax, while Jason provides context on the issue.
6
6mo