Skip to content

Commit

Permalink
Merge branch 'w2p-108045_repeatable-date-fields-label-fix_contribute-…
Browse files Browse the repository at this point in the history
…7.4'
  • Loading branch information
LotteHofstede committed Nov 9, 2023
2 parents 7cf26e4 + 4e2d6d1 commit 4e08496
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 4e08496

Please sign in to comment.