Skip to content
Snippets Groups Projects
Commit d0e9d373 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix: double check error when no value on single searchable select

parent 048b8df1
No related branches found
No related tags found
No related merge requests found
<mat-form-field [floatLabel]="floatLabel"
(click)="focusInputIfNotClickTarget($event, input)"
[dlcmSpinner]="(this.formLabel.get(this.formDefinition.value).value | isNullOrUndefined) && (isLoadingObs | async)"
[dlcmSpinner]="!labelInitialized && (isLoadingObs | async)"
[dlcmSpinnerStrokeWidth]="2"
[dlcmSpinnerDiameter]="24"
>
......
......@@ -99,6 +99,8 @@ export class SharedSearchableSingleSelectPresentational extends SharedAbstractPr
alreadyInit: boolean = false;
noFormControl: boolean;
labelInitialized: boolean = false;
get formValidationHelper(): typeof FormValidationHelper {
return FormValidationHelper;
}
......@@ -148,6 +150,8 @@ export class SharedSearchableSingleSelectPresentational extends SharedAbstractPr
this.isLoadingObs = this.getSelectorWithMemoizedSelectorName("isLoading");
if (!isNullOrUndefined(key) && isNonEmptyString(key)) {
this._store.dispatch(new this.resourceNameSpace.GetById(key));
} else {
this.labelInitialized = true;
}
}
......@@ -165,6 +169,7 @@ export class SharedSearchableSingleSelectPresentational extends SharedAbstractPr
} else {
this.formLabel.get(this.formDefinition.value).setValue("Label not found for " + this.formControl.value);
}
this.labelInitialized = true;
this.computeFloatLabel();
}),
));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment