Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datatable + Virtual Scroller: Multiselect passes [undefined] to onSelectionChange #5870

Closed
sja-cslab opened this issue Feb 1, 2024 · 1 comment · Fixed by #6007
Closed
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@sja-cslab
Copy link
Contributor

sja-cslab commented Feb 1, 2024

Describe the bug

DragSelection/MetaKey Selection + Virtual Scroller passes [undefined, ...] into onSelectionChange event.value

Reproducer

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.

@sja-cslab sja-cslab added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 1, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 1, 2024
@kl-nevermore
Copy link
Contributor

@sja-cslab
I submitted a PR, can you test it? I tested it with doc and it seems no problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
3 participants