-
Notifications
You must be signed in to change notification settings - Fork 160
fix(grid): fix out of bounds row index when navigating down from last layout row - master #16755
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug where navigating down from the last layout row in a multi-row layout grid returns an out-of-bounds row index. The fix adds a boundary check to ensure navigation stays within valid data bounds.
Changes:
- Added boundary validation in the vertical navigation logic to prevent out-of-bounds row indices
- Added comprehensive test coverage for the edge case of navigating down from the last layout row
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| projects/igniteui-angular/grids/core/src/grid-mrl-navigation.service.ts | Added boundary check to prevent out-of-bounds row index when navigating down from last layout row |
| projects/igniteui-angular/grids/grid/src/grid-mrl-keyboard-nav.spec.ts | Added test case to verify the fix for out-of-bounds navigation |
projects/igniteui-angular/grids/core/src/grid-mrl-navigation.service.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| }); | ||
|
|
||
| it('should not return an out of bounds row index when navigating down from the last layout row', () => { | ||
| fix.componentInstance.data = SampleTestData.contactInfoDataFull().slice(0, 10); |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number 10 for the data slice limit is unexplained. Consider extracting it as a named constant (e.g., const TEST_DATA_SIZE = 10;) to clarify why this specific number of records is needed for the test.
Closes #16644
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)