mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Align behavior of template selector with text selector (#24796)
This commit is contained in:
parent
ed2940edc3
commit
2ab8209622
@ -69,11 +69,14 @@ export class HaTemplateSelector extends LitElement {
|
||||
}
|
||||
|
||||
private _handleChange(ev) {
|
||||
const value = ev.target.value;
|
||||
let value = ev.target.value;
|
||||
if (this.value === value) {
|
||||
return;
|
||||
}
|
||||
this.warn = WARNING_STRINGS.find((str) => value.includes(str));
|
||||
if (value === "" && !this.required) {
|
||||
value = undefined;
|
||||
}
|
||||
fireEvent(this, "value-changed", { value });
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user