-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Virtual scroll does not work in an empty conditional element #12565
Comments
hmm, the behaviour is a bit ore weird: it needs a change-detection cycle to kick in it seems. So scrolling back and forth in the plucker makes the content appear |
also in more complex situation (like nesting a ngIf inside a ngSwitchCase which contains a list, i can not get the list to show up |
I'm experiencing the same issue. @Remco75 if you found a stable solution, I am very interested. |
@Ozzyris nope, atm I can not use vritualscroll in my usecase. I hope someone has a suggestion ( or better yet, a fix ;-)) |
I found a fix to make it work in my case, by replacing "*ngIf=" by "[hidden]=" ! Hope that can help. |
Cool Will try that. But the whole point of virtual scroll is to be as cheap as possible.... That's why the if, to render less, with the least amount of bindings.. so still I think this needs a fix |
Yes you are right, let's just say that's can be a quick fix until we have a proper one. |
Hello all! I am going to close this issue as a duplicate of #9655. Thanks! |
@jgw96 sorry, missed the double. But that has been open for a long time. Is there any change it will be resolved any time soon? |
"[ngClass]='{'hide':!data}'" replace "*ngIf" it works for me |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x ] 3.x
I'm submitting a ... (check one with "x")
[ X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
When using virtualScroll in a element that renders on condition (among others *ngIf) and the element is completely empty (besides the virtual scroll elements) the list will not render. Putting in anything inside the div will make it appear (even a will do)
Expected behavior:
It renders always
Steps to reproduce:
http://plnkr.co/edit/zJSEfkUWb2c1GzxTXKDV?p=preview
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):version 3.6.0
The text was updated successfully, but these errors were encountered: