finalised edit item page

This commit is contained in:
lotte
2019-02-19 10:13:49 +01:00
parent 86115c44ce
commit bfa1e77177
19 changed files with 346 additions and 213 deletions

View File

@@ -0,0 +1,22 @@
import { Directive, AfterViewInit, ElementRef, Input } from '@angular/core';
import { isNotEmpty } from '../empty.util';
@Directive({
selector: '[dsAutoFocus]'
})
export class AutoFocusDirective implements AfterViewInit {
@Input() autoFocusSelector: string;
constructor(private el: ElementRef) {
}
ngAfterViewInit() {
if (isNotEmpty(this.autoFocusSelector)) {
return this.el.nativeElement.querySelector(this.autoFocusSelector).focus();
} else {
return this.el.nativeElement.focus();
}
}
}