@@ -24,6 +24,15 @@ export class IgxTreeGridRowComponent extends IgxRowDirective<IgxTreeGridComponen
2424 @ViewChildren ( 'treeCell' )
2525 public cells : QueryList < any > ;
2626
27+ /**
28+ * @hidden
29+ */
30+ @Input ( )
31+ @HostBinding ( 'attr.aria-selected' )
32+ get selected ( ) : boolean {
33+ return ! this . pinnedBodyInstance && this . selectionService . isRowSelected ( this . rowID ) ;
34+ }
35+
2736 /**
2837 * The `ITreeGridRecord` passed to the row component.
2938 *
@@ -56,6 +65,15 @@ export class IgxTreeGridRowComponent extends IgxRowDirective<IgxTreeGridComponen
5665 return this . grid . isRowInPinnedRecordsStructure ( this . _treeRow ) ;
5766 }
5867
68+ /**
69+ * Gets whether the current row is pinned and is in the grid's body,
70+ * and not in the grid's pinned area.
71+ * @hidden @internal
72+ */
73+ public get pinnedBodyInstance ( ) : boolean {
74+ return this . pinned && ( this . grid . pinnedRecords . indexOf ( this . treeRow ) === - 1 ) ;
75+ }
76+
5977 /**
6078 * Returns a value indicating whether the row component is expanded.
6179 *
@@ -113,8 +131,7 @@ export class IgxTreeGridRowComponent extends IgxRowDirective<IgxTreeGridComponen
113131 protected resolveClasses ( ) : string {
114132 const classes = super . resolveClasses ( ) ;
115133 const filteredClass = this . treeRow . isFilteredOutParent ? 'igx-grid__tr--filtered' : '' ;
116- const pinnedRecordClass = this . pinned && ( this . grid . pinnedRecords . indexOf ( this . treeRow ) === - 1 ) ?
117- 'igx-grid__tr--disabled' : '' ;
134+ const pinnedRecordClass = this . pinnedBodyInstance ? 'igx-grid__tr--disabled' : '' ;
118135 return `${ classes } ${ filteredClass } ${ pinnedRecordClass } ` ;
119136 }
120137
0 commit comments