fix(hierarchical-grid): align selected data with expanded row indexes - 21.2.x#17300
Open
georgianastasov wants to merge 4 commits into
Open
fix(hierarchical-grid): align selected data with expanded row indexes - 21.2.x#17300georgianastasov wants to merge 4 commits into
georgianastasov wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Hierarchical Grid selected-data alignment when expanded child-grid placeholder rows are present, so copying/selecting cells from expanded parent rows resolves the intended row data.
Changes:
- Adds a Hierarchical Grid
getSelectedDataoverride that builds adataView-aligned selection source and usesnullfor child-grid placeholder rows. - Guards the base hierarchical index-adjustment path so it only applies when using
filteredSortedData. - Adds a regression test for selecting/copying an expanded parent row cell.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.integration.spec.ts |
Adds regression coverage for selected data after expanding a hierarchical row. |
projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.component.ts |
Introduces Hierarchical Grid-specific selected-data source alignment. |
projects/igniteui-angular/grids/grid/src/grid-base.directive.ts |
Narrows hierarchical selection index adjustment to the legacy filtered/sorted source path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17295
Description
This PR fixes a Hierarchical Grid issue where copying/selecting a cell from an expanded parent row returned the value from the previous row.
The fix uses
dataViewas the selected data source and keeps child-grid placeholder rows asnullto preserve index alignment with visible rows.Motivation / Context
After expanding the
Artist Ahmad Nazerirow, copying itsArtistcell returnedArtist Babila Ebwéléinstead of the selected row value.This happened because selection indexes were based on visible rows, while the selected data source did not account for expanded child-grid placeholder rows.
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Hierarchical Grid, cell selection/copy
How Has This Been Tested?
Added a regression test that expands the
Artist Ahmad Nazerirow, selects itsArtistcell, and verifiesgetSelectedData()returns the correct value instead of the previous row value.|Test Configuration:
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)