ngx-virtual-scroller
ngx-virtual-scroller copied to clipboard
Question: How to get the position of an item in the list?
Can anyone please tell me how to get the position of a child item with respect to the scroll view?
I want to check if an item is close to the bottom of the view.
virtualScroll.viewPortInfo.endIndex
does not work for me because the unequal item size.
Thanks.
virtualScroll.viewPortInfo.startIndexWithBuffer + index
This one if enableUnequalChildrenSizes
is enabled.
I checked that but did not work. I actually need to check how close an item to the bottom of the view. e.g. 10px to the bottom. Indexes are not enough because of enableUnequalChildrenSizes
enabled. This is not just for the very last item in the list, but for any item.
There is an expand button in the item. When user clicks it, item gets expanded. If the item is close to the bottom of the scroll view, users cannot see the expanded section of item. I need to scroll down a bit so that the expanded section is visible.
Thanks