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 requested a review from Copilot November 26, 2025 09:42
@ddaribo ddaribo added the ❌ status: awaiting-test PRs awaiting manual verification label Nov 26, 2025
Copilot finished reviewing on behalf of ddaribo November 26, 2025 09:44
@ddaribo ddaribo linked an issue Nov 26, 2025 that may be closed by this pull request
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 TypeError that occurs when focusing a grid with no data and column headers. The issue was that activeNode can be null in certain scenarios, causing a null reference error when accessing its row property.

  • Added optional chaining to prevent null reference errors when accessing activeNode.row
  • Included comprehensive test coverage for the bug fix

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
projects/igniteui-angular/src/lib/grids/headers/grid-header-row.component.ts Added optional chaining to activeNode?.row in the isLeafHeaderAriaHidden getter to prevent TypeError when activeNode is null
projects/igniteui-angular/src/lib/grids/headers/grid-header-group.component.ts Added optional chaining to activeNode?.row in the ariaHidden getter to prevent TypeError when activeNode is null
projects/igniteui-angular/src/lib/grids/grid/column-group.spec.ts Added test case to verify that the ariaHidden getters do not throw errors when grid has no active node (empty data + focus on grid body)

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

@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 0c42d9b into 19.2.x Nov 26, 2025
12 checks passed
@kacheshmarova kacheshmarova deleted the bpachilova/ariaHidden-header-groups-fix-16517-19.2.x branch November 26, 2025 15:33
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: 19.2.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