web: fix autofocus in ak-form-element

This commit is contained in:
Jens Langhammer 2021-02-22 19:26:50 +01:00
parent 5904070bb2
commit 388c8c8bec

View file

@ -19,6 +19,12 @@ export class FormElement extends LitElement {
@property({ attribute: false })
errors?: Error[];
updated(): void {
this.querySelectorAll<HTMLInputElement>("input[autofocus]").forEach(input => {
input.focus();
});
}
render(): TemplateResult {
return html`<div class="pf-c-form__group">
<label class="pf-c-form__label">