mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix dropdown selection in General Settings (#16754)
This commit is contained in:
parent
b337074758
commit
ddaf403378
@ -128,9 +128,9 @@ class OnboardingCoreConfig extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<ha-country-picker
|
<ha-country-picker
|
||||||
class="flex"
|
class="flex"
|
||||||
.language=${this.hass.locale.language}
|
.language=${this.hass.locale.language}
|
||||||
.label=${
|
.label=${
|
||||||
this.hass.localize(
|
this.hass.localize(
|
||||||
"ui.panel.config.core.section.core.core_config.country"
|
"ui.panel.config.core.section.core.core_config.country"
|
||||||
@ -335,12 +335,12 @@ class OnboardingCoreConfig extends LitElement {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
private _handleValueChanged(ev) {
|
private _handleValueChanged(ev: ValueChangedEvent<string>) {
|
||||||
const target = ev.currentTarget;
|
const target = ev.currentTarget as HTMLElement;
|
||||||
this[`_${target.getAttribute("name")}`] = ev.detail.value;
|
this[`_${target.getAttribute("name")}`] = ev.detail.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _handleChange(ev: ValueChangedEvent<string>) {
|
private _handleChange(ev: Event) {
|
||||||
const target = ev.currentTarget as HaTextField;
|
const target = ev.currentTarget as HaTextField;
|
||||||
this[`_${target.name}`] = target.value;
|
this[`_${target.name}`] = target.value;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,8 @@ import { ConfigUpdateValues, saveCoreConfig } from "../../../data/core";
|
|||||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||||
import "../../../layouts/hass-subpage";
|
import "../../../layouts/hass-subpage";
|
||||||
import { haStyle } from "../../../resources/styles";
|
import { haStyle } from "../../../resources/styles";
|
||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant, ValueChangedEvent } from "../../../types";
|
||||||
|
import type { HaTextField } from "../../../components/ha-textfield";
|
||||||
|
|
||||||
@customElement("ha-config-section-general")
|
@customElement("ha-config-section-general")
|
||||||
class HaConfigSectionGeneral extends LitElement {
|
class HaConfigSectionGeneral extends LitElement {
|
||||||
@ -301,13 +302,13 @@ class HaConfigSectionGeneral extends LitElement {
|
|||||||
this._updateUnits = true;
|
this._updateUnits = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _handleValueChanged(ev) {
|
private _handleValueChanged(ev: ValueChangedEvent<string>) {
|
||||||
const target = ev.currentTarget;
|
const target = ev.currentTarget as HTMLElement;
|
||||||
this[`_${target.name}`] = ev.detail.value;
|
this[`_${target.getAttribute("name")}`] = ev.detail.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _handleChange(ev) {
|
private _handleChange(ev: Event) {
|
||||||
const target = ev.currentTarget;
|
const target = ev.currentTarget as HaTextField;
|
||||||
this[`_${target.name}`] = target.value;
|
this[`_${target.name}`] = target.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user