Skip to content

Conversation

@IMinchev64
Copy link
Contributor

@IMinchev64 IMinchev64 commented Jan 14, 2026

Closes #16644

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

Copy link
Contributor

Copilot AI left a 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

@IMinchev64 IMinchev64 requested a review from Copilot January 15, 2026 11:37
Copy link
Contributor

Copilot AI left a 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);
Copy link

Copilot AI Jan 15, 2026

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MRL is throwing an error when navigating after the latest cell and then trying another key press

3 participants