From b805fc47fd75ccf5fb5e292a9092430ca7df0079 Mon Sep 17 00:00:00 2001 From: Jake Bassett Date: Tue, 9 Nov 2021 15:44:11 -0800 Subject: [PATCH] feat: hide header divider line when in detail list mode --- projects/components/src/table/table.component.scss | 4 ++++ projects/components/src/table/table.component.ts | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/components/src/table/table.component.scss b/projects/components/src/table/table.component.scss index fcd7e7497..9eb63d75e 100644 --- a/projects/components/src/table/table.component.scss +++ b/projects/components/src/table/table.component.scss @@ -110,6 +110,10 @@ $header-height: 32px; border-bottom: unset; } + &.hide-divider { + border-bottom: unset; + } + .data-cell-renderer { display: block; height: 100%; diff --git a/projects/components/src/table/table.component.ts b/projects/components/src/table/table.component.ts index 028b0acfa..1adfeab83 100644 --- a/projects/components/src/table/table.component.ts +++ b/projects/components/src/table/table.component.ts @@ -106,7 +106,8 @@ import { TableColumnConfigExtended, TableService } from './table.service'; [style.margin-left]="index === 0 ? this.calcLeftMarginIndent(row) : 0" [style.margin-right]="index === 1 ? this.calcRightMarginIndent(row, columnDef) : 0" [ngClass]="{ - 'detail-expanded': this.isDetailExpanded(row) + 'detail-expanded': this.isDetailExpanded(row), + 'hide-divider': this.isDetailList() }" class="data-cell" > @@ -699,6 +700,10 @@ export class TableComponent return this.isDetailType() || this.isTreeType(); } + public isDetailList(): boolean { + return this.isDetailType() && this.display === TableStyle.List; + } + public isDetailExpanded(row: StatefulTableRow): boolean { return this.isDetailType() && row.$$state.expanded; }