Bug in re-assignment / re-render logic
Describe the bug
Hello,
I have noticed this issue already a year ago. Please have a look into both GIFs.
Scenario: I have a list of rows, with child-rows. I can expand/collapse these rows.
Here the example where everything is fine:
Here the example where it is broken and sadly not usefull anymore:
The upper working example was done with a version before _ Rewrite view re-assignment logic_
The lower broken example was done with the latest version.
Currently, ALL items re-render and move around, if I expand a row to render its child rows. Before that, only the new child rows render and all rows below,
How does my code look like? When expanding a row, I take my list of items, splice my new child items into it (after the parent item) and at the end I re-reference my items array to trigger the reactivity in the scroller library. Thats it..
Any help with it?
Reproduction
- Render list of items
- shallow copy that array, splice new items somewhere in between
- render that new array
System Info
System:
OS: Windows 11 10.0.26100
CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13800H
Memory: 8.43 GB / 31.69 GB
Binaries:
Node: 24.14.1
npm: 10.8.3
pnpm: 10.12.4
Browsers:
Chrome: 150.0.7871.114
Edge: Chromium (150.0.4078.48)
Firefox: 151.0.4
Internet Explorer: 11.0.26100.8115
npmPackages:
@vitejs/plugin-vue: ^5.0.5 => 5.2.4
vite: ^5.3.3 => 5.4.21
vue: 3.5.13 => 3.5.13Used Package Manager
npm
Validations
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
Source: Akryum/vue-virtual-scroller