-
Notifications
You must be signed in to change notification settings - Fork 160
fix(hierarchical-grid): align selected data with expanded row indexes - master #17299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
8c0d196
bbc60f7
9bde3ca
76e769d
e13aa2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -802,6 +802,22 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti | |
| .reduce((a, b) => a.concat(b), []); | ||
| } | ||
|
|
||
| /** | ||
| * Returns an array of the current cell selection. | ||
| */ | ||
| public override getSelectedData(formatters = false, headers = false): any[] { | ||
| const source: any[] = []; | ||
| this.dataView.forEach((record) => { | ||
| if (this.isChildGridRecord(record)) { | ||
| source.push(null); | ||
| return; | ||
| } | ||
| const rowData = record as any; | ||
| source.push(this.isGhostRecord(rowData) || this.isRecordMerged(rowData) ? rowData.recordRef : rowData); | ||
| }); | ||
|
Comment on lines
+810
to
+817
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The forEach Btw, again referring to the existing overrides in the grid and tree-grid, there is this nested |
||
| return this.extractDataFromSelection(source, formatters, headers); | ||
| } | ||
|
|
||
| /** | ||
| * Returns a `CellType` object that matches the conditions. | ||
| * | ||
|
|
@@ -1165,7 +1181,6 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti | |
| super.initColumns(collection, cb); | ||
| } | ||
|
|
||
|
|
||
| protected override setupColumns() { | ||
| if (this.parentIsland && this.parentIsland.childColumns.length > 0 && !this.autoGenerate) { | ||
| this.createColumnsList(this.parentIsland.childColumns.toArray()); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, edit the JSDoc comment to be as complete as the overrides in the grid and tree-grid as an example.