-
Notifications
You must be signed in to change notification settings - Fork 161
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
Implement Row Pinning for igxHierarchicalGrid. #6979
Conversation
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.
As we decided not to add an additional row type are the changes in navigation services still necessary? If not could you remove them as they will be outdated anyway when the kb navigation enhancements are merged:
#6910
@@ -0,0 +1,31 @@ | |||
<ng-template #defaultCell> |
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.
Is there a need for a new hierarchical-cell template? As the same checks for the displayPinnedChip and the same template for the additional chip will probably need to be added to tree grid cell, perhaps it will be best to have this in the base cell so it can be re-used.
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.
It is supported by both but the regular cells do not support it, so it will only pollute their template. Also the tree grid cell has a separate cell template so it will need to be added there anyway.
projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html
Outdated
Show resolved
Hide resolved
@@ -102,7 +124,7 @@ | |||
[igxForContainerSize]='calcHeight' [igxForItemSize]="renderedRowHeight" [igxForTrackBy]='trackChanges' | |||
#verticalScrollContainer (onChunkPreload)="dataLoading($event)"> | |||
<ng-template #hierarchical_record_template> | |||
<igx-hierarchical-grid-row [gridID]="id" [index]="rowIndex" [rowData]="rowData" #row> | |||
<igx-hierarchical-grid-row [gridID]="id" [index]="getRowIndex(rowIndex, false)" [ghostRow]="isGhostRecord(rowData)" [rowData]="!isGhostRecord(rowData) ? rowData : rowData.recordData" #row> |
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.
Regarding the name of the property - ghostRow. I'm not sure whether we should call it something generic like that as it shows pinning specific UI (pinned chip in the first cell) and is something unique to the pinning feature. Perhaps something like 'pinPlaceholder' would make its purpose more obvious. Same for related apis - isGhostRecord, ghostRec etc.
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.
Well I named it like that because the ghost thing on its own, the way I implemented does not know about the pinning. The pinned chip should be shown only when the row returns true if it is pinned as well, not only being a ghost row. I am ok to name it something else if you think this should not be the case and should be tied only to pinning.
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.
After discussing it further with the team we have agreed that we'll have a disabled
input in the base grid row, which will apply disabled styles and prevent some user interactions when set to true (selection and editing). Pinning will utilize the disabled
input and duplicated row in the unpinned area will have it set to true . If a row is both disabled
and pinned
it will also render the "Pinned" chip in the first cell.
…es. Simplify grid template.
… for preveinting row selection as wel. Update hierarchical grid.
d41097a
to
57c5955
Compare
@skrustev If the first column is templates, then the pinned chip is not rendered anywhere in the pinned row, hence it gives no indication that the row is pinned. The rows looks just disabled. |
chore(*): Disable test related to issue.
Related #6640
Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes