Skip to content

fix(grid): preserve refs and return new array to reflect changes - master#17321

Open
IvanKitanov17 wants to merge 2 commits into
masterfrom
ikitanov/fix-17320-master
Open

fix(grid): preserve refs and return new array to reflect changes - master#17321
IvanKitanov17 wants to merge 2 commits into
masterfrom
ikitanov/fix-17320-master

Conversation

@IvanKitanov17

Copy link
Copy Markdown
Contributor

Closes #17317

Description

Motivation / Context

When using the addRow and deleteRow methods of the grid the data source is not being updated.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

Grids

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • Angular version:
  • Browser(s):
  • OS:

Screenshots / Recordings

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
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Copilot AI review requested due to automatic review settings June 11, 2026 09:46
@IvanKitanov17 IvanKitanov17 added ❌ status: awaiting-test PRs awaiting manual verification grid labels Jun 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an issue where addRow() / deleteRow() updated the grid UI but not the original bound data source, by preserving the original data array reference while still ensuring the rendering pipeline receives updated array references when needed.

Changes:

  • Updated GridBaseAPIService to mutate grid.data in place for add/delete operations (preserving external references) and clear summary cache.
  • Updated IgxGridTransactionPipe to return a new array reference when pipeTrigger changes, so igxGridForOf reliably detects updates even when the source array is mutated in place.

Reviewed changes

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

File Description
projects/igniteui-angular/grids/core/src/common/pipes.ts Ensures grid transaction pipeline produces updated array references for rendering refresh.
projects/igniteui-angular/grids/core/src/api.service.ts Preserves bound data reference by mutating grid.data in place on add/delete.

Comment thread projects/igniteui-angular/grids/core/src/common/pipes.ts Outdated
Comment thread projects/igniteui-angular/grids/core/src/api.service.ts Outdated
Comment thread projects/igniteui-angular/grids/core/src/api.service.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

grid ❌ status: awaiting-test PRs awaiting manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

igx-grid - addRow()/deleteRow() not working as documented

2 participants