Skip to content

Commit ffa6582

Browse files
authored
fix: Heading not coming for details templates (#260)
1 parent 1789ceb commit ffa6582

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

packages/angular-sdk-components/src/lib/_components/infra/view/view.component.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ import { ReferenceComponent } from '../reference/reference.component';
88
import { ComponentMapperComponent } from '../../../_bridge/component-mapper/component-mapper.component';
99

1010
const NO_HEADER_TEMPLATES = ['SubTabs', 'SimpleTable', 'Confirmation', 'DynamicTabs', 'DetailsSubTabs'];
11+
const DETAILS_TEMPLATES = [
12+
'Details',
13+
'DetailsFields',
14+
'DetailsOneColumn',
15+
'DetailsSubTabs',
16+
'DetailsThreeColumn',
17+
'DetailsTwoColumn',
18+
'NarrowWideDetails',
19+
'WideNarrowDetails'
20+
];
21+
22+
function isDetailsTemplate(template) {
23+
return DETAILS_TEMPLATES.includes(template);
24+
}
1125

1226
/**
1327
* WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
@@ -146,7 +160,7 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
146160
this.templateName$ = this.configProps$.template || '';
147161
this.title$ = this.configProps$.title || '';
148162
this.label$ = this.configProps$.label || '';
149-
this.showLabel$ = this.configProps$.showLabel || this.showLabel$;
163+
this.showLabel$ = this.configProps$.showLabel || isDetailsTemplate(this.templateName$) || this.showLabel$;
150164
// label & showLabel within inheritedProps takes precedence over configProps
151165
this.label$ = this.inheritedProps$.label || this.label$;
152166
this.showLabel$ = this.inheritedProps$.showLabel || this.showLabel$;

0 commit comments

Comments
 (0)