Akryum / Akryum/vue-virtual-scroller

ForceUpdate is repreatedly called in pageMode

未關閉
#768 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
TypeScript
星號
10.8k
分支
973
PR 合併指標
30 天內沒有已合併 PR

描述

### Describe the bug

Resize event of scroller element is constantly triggered during scrolling (causing forceUpdate), due to it not having fixed height when pageMode is true.
see: https://github.com/Akryum/vue-virtual-scroller/blob/v1/packages/vue-virtual-scroller/src/components/DynamicScroller.vue#L193

I would assume that size of scroll container(https://github.com/Akryum/vue-virtual-scroller/blob/v1/packages/vue-virtual-scroller/src/components/RecycleScroller.vue#L601) should be observed in this case?

### Reproduction

**Steps to reproduce:**
Have DynamicScroller component with pageMode=true and items of different sizes
Scroll until new item is rendered/hidden
**Expected behavior:**
Resize is not emitted

**Current behavior:**
Resize emitted

### System Info

```shell
System:
OS: Windows 10 10.0.19044
Binaries:
Node: 16.18.1
Yarn: 1.17.3
npm: 8.19.2
Browsers:
Chrome: 107.0.5304.88
Edge: Spartan (44.19041.1266.0), Chromium (107.0.1418.35)
Internet Explorer: 11.0.19041.1566
npmPackages:
vue: 2.6.11 => 2.6.11
vue-virtual-scroller: ~1.1.2 => 1.1.2
```

### Used Package Manager

npm

### Validations

- [X] Read the [docs](https://github.com/Akryum/vue-virtual-scroller/blob/master/packages/vue-virtual-scroller/README.md).
- [X] Check that there isn't [already an issue](https://github.com/Akryum/vue-virtual-scroller/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/Akryum/vue-virtual-scroller/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。