Datatable + Virtual Scroller: Multiselect passes [undefined] to onSelectionChange #5870
Labels
Type: Bug
Issue contains a defect related to a specific component.
Milestone
Describe the bug
DragSelection/MetaKey Selection + Virtual Scroller passes
[undefined, ...]
into onSelectionChange event.valueReproducer
https://stackblitz.com/edit/vitejs-vite-eqhhzf?file=src%2FApp.jsx
PrimeReact version
10.3.3
React version
18.x
Language
ES6
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
Error is seen in Console.
1: Scroll down to bottom of the Table
2: Use Dragselection or MetaKey Selection to select e.g. the last 3 elements.
Result:
onSelectionChanged receives the event but event.data is [undefined, undefined, undefined]
That only seem to happen on Elements, that wasn't there before scrolling.
Expected behavior
Expected behavior is the same as without virtual scroller, and array with the selected Items.
The text was updated successfully, but these errors were encountered: