core/data-grid/column/cell-renderer.component.ts
OnChanges
DoCheck
changeDetection | ChangeDetectionStrategy.OnPush |
selector | c8y-cell-renderer |
templateUrl | ./cell-renderer.component.html |
Properties |
Methods |
Inputs |
Accessors |
constructor(injector: Injector, cd: ChangeDetectorRef)
|
|||||||||
Parameters :
|
spec |
Type : CellRendererSpec
|
ngDoCheck |
ngDoCheck()
|
Returns :
void
|
ngOnChanges |
ngOnChanges()
|
Returns :
void
|
prevSpec |
Type : CellRendererSpec
|
rendererInjector |
Type : Injector
|
rendererType |
Type : "TEMPLATE" | "COMPONENT"
|
spec |
Type : CellRendererSpec
|
_spec | ||||||
set_spec(spec: CellRendererSpec)
|
||||||
Parameters :
Returns :
void
|
<ng-container *ngIf="spec.renderer">
<ng-container
*ngIf="rendererType === 'TEMPLATE'"
[ngTemplateOutlet]="spec.renderer"
[ngTemplateOutletContext]="{ $implicit: spec.context }"
></ng-container>
<ng-container
*ngIf="rendererType === 'COMPONENT'"
[c8yComponentOutlet]="spec.renderer"
[c8yComponentOutletInjector]="rendererInjector"
></ng-container>
</ng-container>
<ng-container *ngIf="!spec.renderer">
<span title="{{ spec.context.value | stringifyObject }}">
{{ spec.context.value | stringifyObject }}
</span>
</ng-container>