From be95e28afe501c83c2cdd733cc6a10e6041d9652 Mon Sep 17 00:00:00 2001 From: Arjunlal B <arjun@traceable.ai> Date: Thu, 21 Dec 2023 11:31:02 +0530 Subject: [PATCH] fix: update init --- .../string-array-table-cell-renderer.component.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/projects/components/src/table/cells/data-renderers/string-array/string-array-table-cell-renderer.component.ts b/projects/components/src/table/cells/data-renderers/string-array/string-array-table-cell-renderer.component.ts index 240a9e00a..624f90591 100644 --- a/projects/components/src/table/cells/data-renderers/string-array/string-array-table-cell-renderer.component.ts +++ b/projects/components/src/table/cells/data-renderers/string-array/string-array-table-cell-renderer.component.ts @@ -52,7 +52,7 @@ export class StringArrayTableCellRendererComponent extends TableCellRendererBase<string[], string[], StringArrayTableCellConfigOptions> implements OnInit { public maxItemsInTooltip: number = 50; - protected readonly viewMode: StringArrayTableCellDisplayMode = StringArrayTableCellDisplayMode.List; + protected readonly viewMode: StringArrayTableCellDisplayMode; public constructor( @Inject(TABLE_COLUMN_CONFIG) columnConfig: TableColumnConfig<StringArrayTableCellConfigOptions>, @Inject(TABLE_COLUMN_INDEX) index: number, @@ -61,10 +61,7 @@ export class StringArrayTableCellRendererComponent @Inject(TABLE_ROW_DATA) rowData: TableRow, ) { super(columnConfig, index, parser, cellData, rowData); - - if (this.columnConfigOptions?.viewMode) { - this.viewMode = this.columnConfigOptions.viewMode; - } + this.viewMode = this.columnConfigOptions?.viewMode ?? StringArrayTableCellDisplayMode.List; } public getOffsetLabel(count: number): string {