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: Checkbox Row Selection and VirtualScroller not working simultaneously #3053

Closed
TomDiekmann opened this issue Jul 13, 2022 · 2 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@TomDiekmann
Copy link

Describe the bug

If i set the virtualScrollerOption property of the datatable together with a row checkbox selection this error occurs as soon as i select a row:

TypeError: selectableVal.every is not a function

If i only add the checkbox selection without the virtualScrollerOption or the other way around this error does not occur.

This error only started to occur when I upgraded to version 8.x. In Version 7.2 it worked fine.

Reproducer

https://codesandbox.io/s/jovial-wood-h8916t?file=/src/demo/DataTableVirtualScrollDemo.js

PrimeReact version

8.x

React version

17.x

Language

ALL

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Try to check a row in the datatable

Expected behavior

The checkbox selection of multiple rows should also be possible if virtual scrolling is active.

@TomDiekmann TomDiekmann added Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: Bug Issue contains a defect related to a specific component. labels Jul 13, 2022
@melloware
Copy link
Member

Definitely agree its not working but not sure if these two features of the datatable were designed to work together.

@mertsincan mertsincan removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 17, 2022
@mertsincan mertsincan added this to the 9.0.0 milestone Jul 17, 2022
@mertsincan
Copy link
Member

mertsincan commented Jul 17, 2022

@melloware For such issues, users can use selectAll and onSelectAllChange properties. Similar to https://www.primefaces.org/primereact/multiselect/ (VirtualScroller demo)

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
Development

No branches or pull requests

3 participants