Akryum / Akryum/vue-virtual-scroller
Bug introduced in v1.1.2, possible cause in description
- 主要語言
- TypeScript
- 星號
- 10.8k
- 分支
- 973
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### Describe the bug
After updating to v1.1.2 we started seeing some strange issues in lists using `DynamicScroller`. Data seems to be reused from other rows. Downgrading to v1.1.1 resolved the issue. Looking at the diff between these two versions, we noticed a highly suspicious code change.

`view.item` is an object in our case, and `keyField` defines how to compare this with existing elements. Direct strict object equality doesn't work even if the objects would have the same contents.
Are we using the library wrong, or is this an unintended change?
Manually reverting this line resolves the problem (with the rest of the code from v1.1.2).
### Reproduction
The current issue is deep within our application, and I'm hoping the description above is clear enough. If it is not, I will try to reproduce with something smaller.
### System Info
```shell
System:
OS: macOS 13.0.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 101.58 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.3.0 - /usr/local/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 9.1.1 - ~/node_modules/.bin/npm
Browsers:
Chrome: 108.0.5359.124
Chrome Canary: 111.0.5486.0
Firefox: 106.0.2
Safari: 16.1
npmPackages:
vue: ^2.6.14 => 2.6.14
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 還沒有評估資料。