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

Range selection is broken on non-first-pages for lazily-paginated multi-selection datatables #7227

Open
4 tasks
henrynguyen7 opened this issue Feb 9, 2025 · 0 comments · May be fixed by #7226
Open
4 tasks
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@henrynguyen7
Copy link

henrynguyen7 commented Feb 9, 2025

Describe the bug

Range selection is broken for non-first-pages on lazily-paginated multi-selection datatables. In other words, on a datatable that has the paginator enabled, with lazy=true, and selectionMode="multiple", then on the first page, shift-clicking multiple rows functions properly as expected by selecting all shift-clicked rows. However, when navigating to any page other than the first page, shift-clicking does NOT work, and instead cancels out any selection.

Pull Request Link

#7226

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

PR: #7226

Reproducer

https://stackblitz.com/edit/vitejs-vite-kup2pzdw?file=src%2FApp.vue

Environment

MacOS 14.6.1 (23G93)

Vue version

3.5.13

PrimeVue version

4.2.5

Node version

22

Browser(s)

No response

Steps to reproduce the behavior

  1. Add a datatable with paginator enabled, with lazy=true, and selectionMode="multiple". Configure it with a datasource of 50 items and 10 results per page. (Done on Stackblitz: https://stackblitz.com/edit/vitejs-vite-kup2pzdw?file=src%2FApp.vue)

  2. Navigate to first page of datatable, then shift+click to select multiple rows.
    Note in console that each event.data field has an object, as expected.
    Note that all desired rows are selected with checkboxes checked, as expected.

  3. Navigate to second page of datatable, shift+click to select multiple rows.
    Note in console that each event.data field is undefined.
    Note that all desired rows are NOT selected, with no checkboxes checked.

Expected behavior

The shift-clicked rows on the second page should be selected with checkboxes checked, and the console (in the Stackblitz example anyway) should show an event object with its data field populated with a Proxy(object).

@henrynguyen7 henrynguyen7 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 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
1 participant