Closed Karman40 closed 2 years ago
Can you reproduce this in a codesandbox? As you didn't mention where in the app you are rendering the search box, is it possible it's outside of the ais-instantsearch component? Every widget needs to be rendered inside InstantSearch for keeping track of the state
I'm trying to do a demo The structure is as follows:
shared /
ListComponent
in that case TableComponent needs to be the parent of the search component
Demo code: https://github.com/Karman40/algolia-widget-error-sample
If you want to receive the error message, enable line 2 of app.component.html. I did a demo algolia project with index.
This is a limitation of angular @Karman40, an injector needs to be in the outer component where the children are used, "children" don't get automatic access.
Here's a PR to your example with those changes which works for me: https://github.com/Karman40/algolia-widget-error-sample/pull/1
I'll close this issue for now, hope you have a great time implementing further!
Thanks for the help! I'm sorry to hear that the original solution doesn't work.
Have you seen the pull request I made to your example @Karman40 ?
Man it would be nice if that repo was still active so I could figure out what I'm doing wrong. I'm getting the same error.
Hello,
I wanted to make an application where there is a central table to which only the template and variables need to be passed, but unfortunately I got stuck during the algola setup. Everything works without the custom widget. But when I put the component in the search engine, I get the following error:
Error message:
list.component
app-table
app-servers-all-filter
app-ais-search-box
Thank you in advance for your help.