Skip to content

Commit cac12b5

Browse files
committed
fix: simplify component
1 parent 96ff138 commit cac12b5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

projects/components/src/table/cells/data-renderers/string-array/string-array-table-cell-renderer.component.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ChangeDetectionStrategy, Component, Inject, OnInit, TemplateRef, ViewChild } from '@angular/core';
1+
import { ChangeDetectionStrategy, Component, Inject, OnInit } from '@angular/core';
22
import { TableColumnConfig, TableRow } from '../../../table-api';
33
import {
44
TABLE_CELL_DATA,
@@ -19,11 +19,11 @@ import { TableCellAlignmentType } from '../../types/table-cell-alignment-type';
1919
styleUrls: ['./string-array-table-cell-renderer.component.scss'],
2020
changeDetection: ChangeDetectionStrategy.OnPush,
2121
template: `
22-
<div class="string-array-cell" [htTooltip]="this.summaryTooltip">
22+
<div class="string-array-cell" [htTooltip]="summaryTooltip">
2323
<span class="first-item">{{ this.firstItem }}</span>
2424
<span class="summary-text">{{ this.summaryText }}</span>
2525
26-
<ng-template #summaryTooltipElement>
26+
<ng-template #summaryTooltip>
2727
<div *ngFor="let value of this.value">{{ value }}</div>
2828
</ng-template>
2929
</div>
@@ -38,9 +38,6 @@ export class StringArrayTableCellRendererComponent extends TableCellRendererBase
3838
public firstItem!: string;
3939
public summaryText!: string;
4040

41-
@ViewChild('summaryTooltipElement')
42-
public summaryTooltip!: TemplateRef<unknown>;
43-
4441
public constructor(
4542
@Inject(TABLE_COLUMN_CONFIG) columnConfig: TableColumnConfig,
4643
@Inject(TABLE_COLUMN_INDEX) index: number,

0 commit comments

Comments
 (0)