Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit 2282b9e

Browse files
arjunlalbjaywalker21
authored andcommitted
feat: support for custom row height in table widget (hypertrace#1310)
1 parent 4c9d0d5 commit 2282b9e

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

projects/components/src/table/table.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ import { TableColumnConfigExtended, TableService } from './table.service';
153153
selectable: this.supportsRowSelection()
154154
}"
155155
class="data-row"
156-
[style.height]="this.rowHeight"
156+
[style.minHeight]="this.rowHeight"
157157
></cdk-row>
158158
159159
<!-- Expandable Detail Rows -->

projects/observability/src/shared/dashboard/widgets/table/table-widget-base.model.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ export abstract class TableWidgetBaseModel extends BaseModel {
126126
})
127127
public resizable: boolean = true;
128128

129+
@ModelProperty({
130+
key: 'row-height',
131+
displayName: 'Row Height',
132+
type: STRING_PROPERTY.type
133+
})
134+
public rowHeight: string = '44px';
135+
129136
@ModelProperty({
130137
key: 'loadingConfig',
131138
required: false,
@@ -196,6 +203,10 @@ export abstract class TableWidgetBaseModel extends BaseModel {
196203
return this.resizable;
197204
}
198205

206+
public getRowHeight(): string {
207+
return this.rowHeight;
208+
}
209+
199210
public getLoadingConfig(): LoadAsyncConfig | undefined {
200211
return this.loadingConfig;
201212
}

projects/observability/src/shared/dashboard/widgets/table/table-widget-renderer.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ import { TableWidgetModel } from './table-widget.model';
105105
[resizable]="this.api.model.isResizable()"
106106
[detailContent]="childDetail"
107107
[syncWithUrl]="this.syncWithUrl"
108+
[rowHeight]="this.api.model.getRowHeight()"
108109
(rowClicked)="this.onRowClicked($event)"
109110
(selectionsChange)="this.onRowSelection($event)"
110111
(columnConfigsChange)="this.onColumnsChange($event)"

0 commit comments

Comments
 (0)