Hi,
I have implemented accordion layout which can expand and collapse on a click of a button.
Logic work’s perfectly fine, but performance is bit slow. On expand/Collapse of the content, instantly the height of the scroll is not getting calculated. user has to wait at-least a sec to see the effect.
i have attached codepen, please review the code and suggest to increase the performance.
Thanks,
Venakt.
If you use $ionicScrollDelegate.resize()
, you golden. Just remember to add a timeout for to wait for things to finish expanding.
1 Like
Thank a lot,
Working perfectly fine. But, Is there any way to do without introducing time?
The time is just to make sure that what every you do on ng-click
has a chance to finish before updating the scroll. You can reduce the time to see if it helps in your case, but I know for my case, the time out is necessary.