mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Increase weight of name and domain in add integration search (#16562)
This commit is contained in:
parent
2ed48d67c6
commit
cbcca6e190
@ -44,6 +44,7 @@ import {
|
|||||||
showConfirmationDialog,
|
showConfirmationDialog,
|
||||||
} from "../../../dialogs/generic/show-dialog-box";
|
} from "../../../dialogs/generic/show-dialog-box";
|
||||||
import { haStyleDialog, haStyleScrollbar } from "../../../resources/styles";
|
import { haStyleDialog, haStyleScrollbar } from "../../../resources/styles";
|
||||||
|
import { loadVirtualizer } from "../../../resources/virtualizer";
|
||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant } from "../../../types";
|
||||||
import "./ha-domain-integrations";
|
import "./ha-domain-integrations";
|
||||||
import "./ha-integration-list-item";
|
import "./ha-integration-list-item";
|
||||||
@ -127,6 +128,11 @@ class AddIntegrationDialog extends LitElement {
|
|||||||
|
|
||||||
public willUpdate(changedProps: PropertyValues): void {
|
public willUpdate(changedProps: PropertyValues): void {
|
||||||
super.willUpdate(changedProps);
|
super.willUpdate(changedProps);
|
||||||
|
|
||||||
|
if (!this.hasUpdated) {
|
||||||
|
loadVirtualizer();
|
||||||
|
}
|
||||||
|
|
||||||
if (this._filter === undefined && this._initialFilter !== undefined) {
|
if (this._filter === undefined && this._initialFilter !== undefined) {
|
||||||
this._filter = this._initialFilter;
|
this._filter = this._initialFilter;
|
||||||
}
|
}
|
||||||
@ -234,10 +240,10 @@ class AddIntegrationDialog extends LitElement {
|
|||||||
if (filter) {
|
if (filter) {
|
||||||
const options: Fuse.IFuseOptions<IntegrationListItem> = {
|
const options: Fuse.IFuseOptions<IntegrationListItem> = {
|
||||||
keys: [
|
keys: [
|
||||||
"name",
|
{ name: "name", weight: 5 },
|
||||||
"domain",
|
{ name: "domain", weight: 5 },
|
||||||
|
{ name: "integrations", weight: 2 },
|
||||||
"supported_by",
|
"supported_by",
|
||||||
"integrations",
|
|
||||||
"iot_standards",
|
"iot_standards",
|
||||||
],
|
],
|
||||||
isCaseSensitive: false,
|
isCaseSensitive: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user