mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-26 06:17:20 +00:00
Remember filter between navigation (#11565)
This commit is contained in:
parent
9be5a15c77
commit
04668ad809
@ -571,6 +571,9 @@ export class HaDataTable extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _handleSearchChange(ev: CustomEvent): void {
|
private _handleSearchChange(ev: CustomEvent): void {
|
||||||
|
if (this.filter) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this._debounceSearch(ev.detail.value);
|
this._debounceSearch(ev.detail.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,6 +234,9 @@ export class HaTabsSubpageDataTable extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _handleSearchChange(ev: CustomEvent) {
|
private _handleSearchChange(ev: CustomEvent) {
|
||||||
|
if (this.filter === ev.detail.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.filter = ev.detail.value;
|
this.filter = ev.detail.value;
|
||||||
fireEvent(this, "search-changed", { value: this.filter });
|
fireEvent(this, "search-changed", { value: this.filter });
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ export class HaConfigDeviceDashboard extends LitElement {
|
|||||||
|
|
||||||
@state() private _showDisabled = false;
|
@state() private _showDisabled = false;
|
||||||
|
|
||||||
@state() private _filter = "";
|
@state() private _filter: string = history.state?.filter || "";
|
||||||
|
|
||||||
@state() private _numHiddenDevices = 0;
|
@state() private _numHiddenDevices = 0;
|
||||||
|
|
||||||
@ -490,6 +490,7 @@ export class HaConfigDeviceDashboard extends LitElement {
|
|||||||
|
|
||||||
private _handleSearchChange(ev: CustomEvent) {
|
private _handleSearchChange(ev: CustomEvent) {
|
||||||
this._filter = ev.detail.value;
|
this._filter = ev.detail.value;
|
||||||
|
history.replaceState({ filter: this._filter }, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
private _clearFilter() {
|
private _clearFilter() {
|
||||||
|
@ -109,7 +109,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
@state() private _showReadOnly = true;
|
@state() private _showReadOnly = true;
|
||||||
|
|
||||||
@state() private _filter = "";
|
@state() private _filter: string = history.state?.filter || "";
|
||||||
|
|
||||||
@state() private _numHiddenEntities = 0;
|
@state() private _numHiddenEntities = 0;
|
||||||
|
|
||||||
@ -711,6 +711,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
private _handleSearchChange(ev: CustomEvent) {
|
private _handleSearchChange(ev: CustomEvent) {
|
||||||
this._filter = ev.detail.value;
|
this._filter = ev.detail.value;
|
||||||
|
history.replaceState({ filter: this._filter }, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
private _handleSelectionChanged(
|
private _handleSelectionChanged(
|
||||||
|
@ -137,7 +137,7 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) {
|
|||||||
window.location.hash.substring(1)
|
window.location.hash.substring(1)
|
||||||
);
|
);
|
||||||
|
|
||||||
@state() private _filter?: string;
|
@state() private _filter: string = history.state?.filter || "";
|
||||||
|
|
||||||
@state() private _diagnosticHandlers?: Record<string, boolean>;
|
@state() private _diagnosticHandlers?: Record<string, boolean>;
|
||||||
|
|
||||||
@ -613,6 +613,7 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
private _handleSearchChange(ev: CustomEvent) {
|
private _handleSearchChange(ev: CustomEvent) {
|
||||||
this._filter = ev.detail.value;
|
this._filter = ev.detail.value;
|
||||||
|
history.replaceState({ filter: this._filter }, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _highlightEntry() {
|
private async _highlightEntry() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user