Improve action picker UI and search (#25525)

This commit is contained in:
Paul Bottein
2025-05-28 15:03:17 +02:00
committed by GitHub
parent 0eaeeb1141
commit b458a1d7c6
7 changed files with 177 additions and 89 deletions

View File

@@ -51,6 +51,9 @@ export class HaEntityPicker extends LitElement {
@property({ type: Boolean, attribute: "allow-custom-entity" })
public allowCustomEntity;
@property({ type: Boolean, attribute: "show-entity-id" })
public showEntityId = false;
@property() public label?: string;
@property() public value?: string;
@@ -166,11 +169,15 @@ export class HaEntityPicker extends LitElement {
`;
};
private get _showEntityId() {
return this.showEntityId || this.hass.userData?.showEntityIdPicker;
}
private _rowRenderer: ComboBoxLitRenderer<EntityComboBoxItem> = (
item,
{ index }
) => {
const showEntityId = this.hass.userData?.showEntityIdPicker;
const showEntityId = this._showEntityId;
return html`
<ha-combo-box-item type="button" compact .borderTop=${index !== 0}>