Fix helper UI (#5161)

Fixes #5146
Fixes #5145
Fixes #5142
This commit is contained in:
Bram Kragten
2020-03-12 20:10:06 +01:00
committed by GitHub
parent 06cd7556f3
commit 1d0389327f
8 changed files with 68 additions and 1 deletions

View File

@@ -44,6 +44,14 @@ class HaInputDateTimeForm extends LitElement {
}
}
public focus() {
this.updateComplete.then(() =>
(this.shadowRoot?.querySelector(
"[dialogInitialFocus]"
) as HTMLElement)?.focus()
);
}
protected render(): TemplateResult {
if (!this.hass) {
return html``;
@@ -63,6 +71,7 @@ class HaInputDateTimeForm extends LitElement {
"ui.dialogs.helper_settings.required_error_msg"
)}"
.invalid=${nameInvalid}
dialogInitialFocus
></paper-input>
<ha-icon-input
.value=${this._icon}