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

Table: Multiple selection with SHIFT/click does not work together with paginator and lazy loading #14140

Closed
aabruc opened this issue Nov 16, 2023 · 4 comments
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@aabruc
Copy link

aabruc commented Nov 16, 2023

Describe the bug

We have problems with the multi select via SHIFT/click in tables.
The problem occurs when you have set a paginator and then try a multi select on the second page (it works perfectly on the first).
All rows up to the end, starting with the anchor row, are selected.
The demo table on PrimeNg works, but ours does not.
The difference is the lazy load, which is not combined in the demo table.
I added this to Stackblick and indeed the multi select no longer works properly.

Environment

The example environment

Reproducer

https://stackblitz.com/edit/mkvney-7dpojm?file=src%2Fapp%2Fdemo%2Ftable-multiple-selection-demo.ts

Angular version

16

PrimeNG version

16.3.1 and higher / The example environment

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

The example environment

Browser(s)

No response

Steps to reproduce the behavior

  1. Switch button 'MetaKey' should be on
  2. Goto table page two
  3. Select one row
  4. Try to select a block of rows (maybe three rows) via SHIFT/click
  5. All rows up to the end, starting with the anchor row, are selected incorrectly

Expected behavior

Should be clear ;)

@aabruc aabruc added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 16, 2023
@mnhock
Copy link

mnhock commented Nov 17, 2023

Can confirm the bug.

@vinnyab28
Copy link
Contributor

Please find the PR for the fix here: #14209

@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 4, 2024
@cetincakiroglu cetincakiroglu added this to the 17.3.1 milestone Jan 4, 2024
@cetincakiroglu
Copy link
Contributor

Fixed in #14209

@quentin-ineat-ca
Copy link

Works fine for the bug.

Doing "shift + click" on the 2nd page after doing a previous selection on another page acts as a new selection.
Is this the expected behaviour ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

5 participants