Input: Add * for required fields with type array. Scroll to top in open of a modal.

This commit is contained in:
Konstantinos Triantafyllou 2023-07-18 15:27:02 +03:00
parent 9855f5c179
commit 2b7c5da3d7
2 changed files with 4 additions and 1 deletions

View File

@ -566,7 +566,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
}
}));
}
if (this.formAsControl?.validator) {
if (this.formAsControl?.validator || this.formAsArray?.validator) {
let validator = this.formControl.validator({} as AbstractControl);
this.required = (validator && validator.required);
}

View File

@ -205,6 +205,9 @@ export class AlertModal implements OnInit, AfterViewInit, OnDestroy {
open() {
if(typeof UIkit !== "undefined") {
UIkit.modal(this.element.nativeElement).show();
if(this.overflowBody) {
this.bodyElement.nativeElement.scrollTo(0, 0);
}
}
}