mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 13:07:49 +00:00
Adds clear value handler (#4205)
* Adds clear value handler * Add the same to device picker
This commit is contained in:
parent
4f41508110
commit
9e2a0c77d5
@ -164,6 +164,7 @@ class HaDevicePicker extends SubscribeMixin(LitElement) {
|
||||
slot="suffix"
|
||||
class="clear-button"
|
||||
icon="hass:close"
|
||||
@click=${this._clearValue}
|
||||
no-ripple
|
||||
>
|
||||
Clear
|
||||
@ -189,6 +190,10 @@ class HaDevicePicker extends SubscribeMixin(LitElement) {
|
||||
`;
|
||||
}
|
||||
|
||||
private _clearValue() {
|
||||
this.value = "";
|
||||
}
|
||||
|
||||
private get _value() {
|
||||
return this.value || "";
|
||||
}
|
||||
|
@ -166,6 +166,7 @@ class HaEntityPicker extends LitElement {
|
||||
slot="suffix"
|
||||
class="clear-button"
|
||||
icon="hass:close"
|
||||
@click=${this._clearValue}
|
||||
no-ripple
|
||||
>
|
||||
Clear
|
||||
@ -191,6 +192,10 @@ class HaEntityPicker extends LitElement {
|
||||
`;
|
||||
}
|
||||
|
||||
private _clearValue() {
|
||||
this.value = "";
|
||||
}
|
||||
|
||||
private get _value() {
|
||||
return this.value || "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user