I have a simple chat app where I have to scroll to the last message (bottom).
The messages are loaded from Firebase array objects with *ngFor directive.
I have to call content.scrollToBottom() after *ngFor and without any delay.
Now I can try using timeout, but the result it not an instant scroll, but a load of content and then a scroll to bottom.
Performing a function when ngFor has finished all entries was discussed here, perhaps that helps!
1 Like
This works, but only on Android app and I don’t know because It fires more than one times.
In iOS version on real device it doesn’t work and the app is very very slow.
I have also a side effect: when I click on a message (not last) the function fired again and I’m scrolled to the bottom. This in Android and iOS version.
Other way to solve it ?