-
Notifications
You must be signed in to change notification settings - Fork 73
ais-range-slider does not works under *ngIf #804
Comments
could you conditionally show & hide a wrapping container of the slider? Note that when you not render the component, the refinement will likely disappear |
Hello @Haroenv , it is not working. see https://ng-bootstrap.github.io/#/components/accordion
It is not working because that component destroys alll components which are not visible. Another example with switch case is not also working - and it has parent div inside switch case.
Thx. |
This will likely be a problem with Angular InstantSearch because as @Haroenv mentioned, unmounted components' search state (i.e., search parameters) are ignored by InstantSearch. This means that when users visually toggle the accordion, the search results might change. Is there a way to tell |
@francoischalifour Yes, luckylly there is. But it is making my DOM deeper and it is decresing my Lighthouse score. I should be possible either pass arguments directely through "SearchRequestParameters" or from another place in DOM. Still was not explained why "ais-range-slider" causes crashes and for example "ais-refinement-list" not. |
The error seems to happen because we expect the slider container to exist at first render to create the slider instance. Since |
Describe the bug 🐛
Range slider cannot be hidden by *ngIf. I can use display none in some cases. However If i use third-party lib like ngBootstrap with ngAccordion, it does not works because it is using *ngIf internally because it prevents to render large scaled DOM.
To Reproduce 🔍
Steps to reproduce the behavior:
Expected behavior 💭
NgIf can be use like for the other types of filters in your library.
Screenshots 🖥
Console log that shows you the problem:
Environment:
The text was updated successfully, but these errors were encountered: