| 133 | inputs: [{name: 'columns', alias: 'cdkFooterRowDef'}], |
| 134 | }) |
| 135 | export class CdkFooterRowDef extends BaseRowDef implements CanStick, OnChanges { |
| 136 | _table? = inject(CDK_TABLE, {optional: true}); |
| 137 | |
| 138 | private _hasStickyChanged = false; |
| 139 | |
| 140 | /** Whether the row is sticky. */ |
| 141 | @Input({alias: 'cdkFooterRowDefSticky', transform: booleanAttribute}) |
| 142 | get sticky(): boolean { |
| 143 | return this._sticky; |
| 144 | } |
| 145 | set sticky(value: boolean) { |
| 146 | if (value !== this._sticky) { |
| 147 | this._sticky = value; |
| 148 | this._hasStickyChanged = true; |
| 149 | } |
| 150 | } |
| 151 | private _sticky = false; |
| 152 | |
| 153 | // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance. |
| 154 | // Explicitly define it so that the method is called as part of the Angular lifecycle. |
| 155 | override ngOnChanges(changes: SimpleChanges<this>): void { |
| 156 | super.ngOnChanges(changes); |
| 157 | } |
| 158 | |
| 159 | /** Whether the sticky state has changed. */ |
| 160 | hasStickyChanged(): boolean { |
| 161 | const hasStickyChanged = this._hasStickyChanged; |
| 162 | this.resetStickyChanged(); |
| 163 | return hasStickyChanged; |
| 164 | } |
| 165 | |
| 166 | /** Resets the sticky changed state. */ |
| 167 | resetStickyChanged(): void { |
| 168 | this._hasStickyChanged = false; |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * Data row definition for the CDK table. |
nothing calls this directly
no outgoing calls
no test coverage detected