Table: Selectable row tabbing does not work on sort or page change #17630
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
In a paginated or sortable grid, where single row selection is enabled, if user change page or sort a column then tab does move focus to any rows, clicking on row makes the tab work again, but that defeats the purpose.
The reason for this issue is that in table.ts, in pSelectableRow directive, tabIndex is returned based on following condition:
At first load anchorRowIndex is undefined and index is also undefined so it works and rows are selectable via tabbing, but on page change or sort anchorRowIndex is set as null which does not equal undefined so tab index is set to -1 for rows and rows are no longer tab accessible.
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://v18.primeng.org/table#stateful
Environment
I test it on PrimeNG showcase.
Angular version
18.2.12
PrimeNG version
v18 (LTS Only)
Node version
18.20.2
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
Even after page change or column sort applied, rows should be accessible via tab.
The text was updated successfully, but these errors were encountered: