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

rowIndex undefined when pressing tab key while second row is selected in (editable) DataTable #6657

Closed
rayman-de opened this issue May 23, 2024 · 0 comments · Fixed by #6658, leoo1992/GeradorQRCode#40 or mtech-31-quemistry/quemistry_client_web#3
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@rayman-de
Copy link
Contributor

rayman-de commented May 23, 2024

Describe the bug

Pressing the tab key while a cell in any other row than the first row inside a Datatable is selected leads to a thrown exception because rowIndex is undefined.

This is caused by small typo in BodyRow.js in the definition of onTabKey:
It should read
focusedItem !== rows[0] && (rows[props.rowIndex].tabIndex = '-1');
instead of
focusedItem !== rows[0] && (rows[rowIndex].tabIndex = '-1');

Reproducer

No response

PrimeReact version

10.6.5

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@rayman-de rayman-de added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 23, 2024
rayman-de added a commit to rayman-de/primereact that referenced this issue May 23, 2024
Resolve issue primefaces#6657 by adding the missing "props"
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 23, 2024
@melloware melloware self-assigned this May 23, 2024
@melloware melloware added this to the 10.7.0 milestone May 23, 2024
melloware added a commit to melloware/primereact that referenced this issue May 23, 2024
melloware pushed a commit that referenced this issue May 23, 2024
Resolve issue #6657 by adding the missing "props"
@melloware melloware assigned rayman-de and unassigned melloware May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
2 participants