Input: Add * for required fields with type array. Scroll to top in open of a modal.
This commit is contained in:
parent
9855f5c179
commit
2b7c5da3d7
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue