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 - Selection with keyboard brings different errors #14463

Closed
quentin-ineat-ca opened this issue Jan 2, 2024 · 3 comments
Closed

Table - Selection with keyboard brings different errors #14463

quentin-ineat-ca opened this issue Jan 2, 2024 · 3 comments
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

Comments

@quentin-ineat-ca
Copy link

quentin-ineat-ca commented Jan 2, 2024

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 :

ERROR TypeError: _data.slice is not a function
    at Table.dataToRender (vendor.js:205565:20)
    at SelectableRow.onSpaceKey (vendor.js:208571:28)
    at SelectableRow.onKeyDown (vendor.js:208497:14)
    at SelectableRow_keydown_HostBindingHandler (vendor.js:208639:22)
    at executeListenerWithErrorHandling (vendor.js:89768:12)
    at wrapListenerIn_markDirtyAndPreventDefault (vendor.js:89799:18)
    at HTMLTableRowElement.<anonymous> (vendor.js:110025:112)
    at _ZoneDelegate.invokeTask (polyfills.js:8271:171)
    at vendor.js:79809:49
    at AsyncStackTaggingZoneSpec.onInvokeTask (vendor.js:79809:30)

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)

dataToRender(data: any) {
        const _data = data || 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).
Screenshot 2024-01-02 at 16 14 46

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 1
Change 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 selected

@quentin-ineat-ca quentin-ineat-ca added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 2, 2024
@quentin-ineat-ca
Copy link
Author

quentin-ineat-ca commented Jan 4, 2024

Seems the 2nd bug was fixed in 17.3.1 (updated stackblitz link).
FIX: Multiple selection with SHIFT/click by @vinnyab28 in #14209

First bug is still here.

@mehmetcetin01140 mehmetcetin01140 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 5, 2024
Copy link

github-actions bot commented Jun 1, 2024

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response label Jun 1, 2024
Copy link

github-actions bot commented Jun 9, 2024

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants