mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 07:16:39 +00:00
Allow to clear integration filter on mobile (#11844)
This commit is contained in:
parent
acfeea5c92
commit
3d9c31aef9
@ -438,6 +438,13 @@ export class HaConfigDeviceDashboard extends LitElement {
|
|||||||
)}
|
)}
|
||||||
.path=${mdiFilterVariant}
|
.path=${mdiFilterVariant}
|
||||||
></ha-icon-button>
|
></ha-icon-button>
|
||||||
|
${this.narrow && activeFilters?.length
|
||||||
|
? html`<mwc-list-item @click=${this._clearFilter}
|
||||||
|
>${this.hass.localize("ui.components.data-table.filtering_by")}
|
||||||
|
${activeFilters.join(", ")}
|
||||||
|
<span class="clear">Clear</span></mwc-list-item
|
||||||
|
>`
|
||||||
|
: ""}
|
||||||
<ha-check-list-item
|
<ha-check-list-item
|
||||||
left
|
left
|
||||||
@request-selected=${this._showDisabledChanged}
|
@request-selected=${this._showDisabledChanged}
|
||||||
@ -523,6 +530,11 @@ export class HaConfigDeviceDashboard extends LitElement {
|
|||||||
ha-button-menu {
|
ha-button-menu {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
.clear {
|
||||||
|
color: var(--primary-color);
|
||||||
|
padding-left: 8px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
haStyle,
|
haStyle,
|
||||||
];
|
];
|
||||||
|
@ -585,6 +585,15 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
)}
|
)}
|
||||||
.path=${mdiFilterVariant}
|
.path=${mdiFilterVariant}
|
||||||
></ha-icon-button>
|
></ha-icon-button>
|
||||||
|
${this.narrow && activeFilters?.length
|
||||||
|
? html`<mwc-list-item @click=${this._clearFilter}
|
||||||
|
>${this.hass.localize(
|
||||||
|
"ui.components.data-table.filtering_by"
|
||||||
|
)}
|
||||||
|
${activeFilters.join(", ")}
|
||||||
|
<span class="clear">Clear</span></mwc-list-item
|
||||||
|
>`
|
||||||
|
: ""}
|
||||||
<ha-check-list-item
|
<ha-check-list-item
|
||||||
@request-selected=${this._showDisabledChanged}
|
@request-selected=${this._showDisabledChanged}
|
||||||
.selected=${this._showDisabled}
|
.selected=${this._showDisabled}
|
||||||
@ -896,6 +905,11 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
ha-button-menu {
|
ha-button-menu {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
.clear {
|
||||||
|
color: var(--primary-color);
|
||||||
|
padding-left: 8px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user