Put item at the top of picker result if there is an exact match with entity id (#25625)

This commit is contained in:
Paul Bottein
2025-05-28 22:33:42 +02:00
committed by GitHub
parent 9c0ce41ebb
commit 16e20456e2
4 changed files with 67 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ import "./ha-picker-combo-box";
import type {
HaPickerComboBox,
PickerComboBoxItem,
PickerComboBoxSearchFn,
} from "./ha-picker-combo-box";
import "./ha-picker-field";
import type { HaPickerField, PickerValueRenderer } from "./ha-picker-field";
@@ -57,6 +58,9 @@ export class HaGenericPicker extends LitElement {
@property({ attribute: false })
public valueRenderer?: PickerValueRenderer;
@property({ attribute: false })
public searchFn?: PickerComboBoxSearchFn<PickerComboBoxItem>;
@property({ attribute: "not-found-label", type: String })
public notFoundLabel?: string;
@@ -102,6 +106,7 @@ export class HaGenericPicker extends LitElement {
.notFoundLabel=${this.notFoundLabel}
.getItems=${this.getItems}
.getAdditionalItems=${this.getAdditionalItems}
.searchFn=${this.searchFn}
></ha-picker-combo-box>
`}
</div>