Skip to content

Commit

Permalink
108045: Fix for repeatable date field labels
Browse files Browse the repository at this point in the history
  • Loading branch information
LotteHofstede authored and tdonohue committed Nov 10, 2023
1 parent 6975fd1 commit 30ce844
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div>
<fieldset class="d-flex">
<legend [id]="'legend_' + model.id" [ngClass]="[getClass('element', 'label'), getClass('grid', 'label')]">
<legend *ngIf="!model.repeatable" [id]="'legend_' + model.id" [ngClass]="[getClass('element', 'label'), getClass('grid', 'label')]">
{{model.placeholder}} <span *ngIf="model.required">*</span>
</legend>
<ds-number-picker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const DYNAMIC_FORM_CONTROL_TYPE_DSDATEPICKER = 'DATE';
export interface DynamicDsDateControlModelConfig extends DynamicDatePickerModelConfig {
legend?: string;
typeBindRelations?: DynamicFormControlRelation[];
repeatable: boolean;
}

/**
Expand All @@ -37,7 +38,7 @@ export class DynamicDsDatePickerModel extends DynamicDateControlModel {
this.metadataValue = (config as any).metadataValue;
this.typeBindRelations = config.typeBindRelations ? config.typeBindRelations : [];
this.hiddenUpdates = new BehaviorSubject<boolean>(this.hidden);

this.repeatable = config.repeatable;
// This was a subscription, then an async setTimeout, but it seems unnecessary
const parentModel = this.getRootParent(this);
if (parentModel && isNotUndefined(parentModel.hidden)) {
Expand Down

0 comments on commit 30ce844

Please sign in to comment.