Skip to content

Conversation

@ddaribo
Copy link
Contributor

@ddaribo ddaribo commented Nov 26, 2025

Closes #16517

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

@ddaribo ddaribo added the ❌ status: awaiting-test PRs awaiting manual verification label Nov 26, 2025
@ddaribo ddaribo requested a review from Copilot November 26, 2025 09:28
Copilot finished reviewing on behalf of ddaribo November 26, 2025 09:30
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 null TypeError that occurs when focusing a grid with no data and column headers. The issue arises when grid.navigation.activeNode is null, causing attempts to access its row property to fail.

Key Changes:

  • Added optional chaining (?.) to safely access activeNode.row in two header components
  • Added a test case to verify the fix prevents the TypeError

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
grid-header-row.component.ts Added optional chaining to prevent null reference error when accessing activeNode.row in isLeafHeaderAriaHidden getter
grid-header-group.component.ts Added optional chaining to prevent null reference error when accessing activeNode.row in ariaHidden getter
column-group.spec.ts Added test case to verify no errors are thrown when focusing a grid with no active node (contains a critical bug in the test implementation)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@IvanKitanov17 IvanKitanov17 added 💥 status: in-test PRs currently being tested ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification 💥 status: in-test PRs currently being tested labels Nov 26, 2025
@kacheshmarova kacheshmarova merged commit 3f8d1c8 into master Nov 26, 2025
7 checks passed
@kacheshmarova kacheshmarova deleted the bpachilova/ariaHidden-header-groups-fix-16517 branch November 26, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

grid: multi-column-headers grid version: 21.0.x ✅ status: verified Applies to PRs that have passed manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: TypeError: Cannot read properties of null (reading 'row')

4 participants