Range selection is broken on non-first-pages for lazily-paginated multi-selection datatables #7227
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
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
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
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)
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.
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).The text was updated successfully, but these errors were encountered: