Skip to content

Commit

Permalink
fix: Heading not coming for details templates (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
tumms2021389 authored Dec 23, 2024
1 parent 1789ceb commit ffa6582
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ import { ReferenceComponent } from '../reference/reference.component';
import { ComponentMapperComponent } from '../../../_bridge/component-mapper/component-mapper.component';

const NO_HEADER_TEMPLATES = ['SubTabs', 'SimpleTable', 'Confirmation', 'DynamicTabs', 'DetailsSubTabs'];
const DETAILS_TEMPLATES = [
'Details',
'DetailsFields',
'DetailsOneColumn',
'DetailsSubTabs',
'DetailsThreeColumn',
'DetailsTwoColumn',
'NarrowWideDetails',
'WideNarrowDetails'
];

function isDetailsTemplate(template) {
return DETAILS_TEMPLATES.includes(template);
}

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

0 comments on commit ffa6582

Please sign in to comment.