Table - Selection with keyboard brings different errors #14463
Labels
Resolution: Stale
Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Describe the bug
Hello,
Inside Table Component, when the keyboard is used to select rows and according to the section Accessibility https://primeng.org/table#accessibility, errors are raised or the behavior is not good. Sorry if double bug in one issue, not sure if totally related.
First bug :
Using control + a or shift + space brings :
Because in table.ts, data received is a number with keyboard controls while it's undefined on simple click (or an array of rowData with this.processedData)
Second bug :
fixed in 17.3.1 (updated stackblitz link)
FIX: Multiple selection with SHIFT/click by @vinnyab28 in #14209
Select row, change page and use shift and use shift on another row brings a strange behavior by selecting undefined rows. Continue with shift and it will select other undefined rows (no error).Thank you
Environment
Chrome 120
MacBook Pro 14.2.1
Reproducer
https://stackblitz.com/edit/ty2zuu-6efrnz?file=package.json
Angular version
17.0.5
PrimeNG version
17.3.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.18.0
Browser(s)
Chrome 120
Steps to reproduce the behavior
First bug :
Use control + a or shift + space (maybe other)
=> Error in console
Second bug :
Select row 1 (or other) on page 1Change Page
Select row 3 (or other) on page 2 with "Shift + click"
Select row 5 (or other) on page 2 with "Shift + click"
=> Undefined rows selected
Expected behavior
First bug :
=> No error
Second bug :
=> Corrected rows should be selectedThe text was updated successfully, but these errors were encountered: