@plcmp/pl-virtual-scroll 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plcmp/pl-virtual-scroll",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Component for lazy list render.",
5
5
  "main": "pl-virtual-scroll.js",
6
6
  "repository": {
@@ -252,6 +252,9 @@ class PlVirtualScroll extends PlElement {
252
252
 
253
253
  if (Math.abs(predictedHeight - currentHeight) > restRows / 10 * avgHeight) {
254
254
  canvas.style.setProperty('height', predictedHeight + 'px');
255
+ if (predictedHeight - currentHeight > avgHeight) {
256
+ setTimeout(() => this.render(), 0);
257
+ }
255
258
  }
256
259
  }
257
260