lVlyke / lithium-ngx-virtual-scroll

A fast and lightweight virtual scrolling solution for Angular that supports single column lists, grid lists and view caching.
MIT License
24 stars 4 forks source link

Support calculating item size based on actual container boundaries #17

Closed lincolnthree closed 1 year ago

lincolnthree commented 1 year ago

Since there may be padding between the virtual-scroll component, and the parent scroll container, in that scenario it can cause itemsPerRow to be calculated incorrectly.

This PR attempts to compensate for that scenario by always defining the virtual-scroll element as a block-level element, then using it to calculate the width.

lVlyke commented 1 year ago

These changes along with the additional changes discussed above have been merged via #26 and will be released shortly under version 0.3.0.

Thanks again for your contribution!