mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 19:09:48 +00:00
Use list item for entity picker (#25176)
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com> Co-authored-by: Wendelin <w@pe8.at>
This commit is contained in:
@@ -39,8 +39,8 @@ import { SubscribeMixin } from "../mixins/subscribe-mixin";
|
||||
import type { HomeAssistant } from "../types";
|
||||
import "./device/ha-device-picker";
|
||||
import type { HaDevicePickerDeviceFilterFunc } from "./device/ha-device-picker";
|
||||
import "./entity/ha-entity-picker";
|
||||
import type { HaEntityPickerEntityFilterFunc } from "./entity/ha-entity-picker";
|
||||
import "./entity/ha-entity-combo-box";
|
||||
import type { HaEntityComboBoxEntityFilterFunc } from "./entity/ha-entity-combo-box";
|
||||
import "./ha-area-floor-picker";
|
||||
import { floorDefaultIconPath } from "./ha-floor-icon";
|
||||
import "./ha-icon-button";
|
||||
@@ -80,7 +80,7 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
||||
public deviceFilter?: HaDevicePickerDeviceFilterFunc;
|
||||
|
||||
@property({ attribute: false })
|
||||
public entityFilter?: HaEntityPickerEntityFilterFunc;
|
||||
public entityFilter?: HaEntityComboBoxEntityFilterFunc;
|
||||
|
||||
@property({ type: Boolean, reflect: true }) public disabled = false;
|
||||
|
||||
@@ -449,7 +449,7 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
||||
></ha-label-picker>
|
||||
`
|
||||
: html`
|
||||
<ha-entity-picker
|
||||
<ha-entity-combo-box
|
||||
.hass=${this.hass}
|
||||
id="input"
|
||||
.type=${"entity_id"}
|
||||
@@ -464,7 +464,7 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
||||
@value-changed=${this._targetPicked}
|
||||
@click=${this._preventDefault}
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
></ha-entity-combo-box>
|
||||
`}</mwc-menu-surface
|
||||
>`;
|
||||
}
|
||||
@@ -839,7 +839,7 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
||||
mwc-menu-surface {
|
||||
--mdc-menu-min-width: 100%;
|
||||
}
|
||||
ha-entity-picker,
|
||||
ha-entity-combo-box,
|
||||
ha-device-picker,
|
||||
ha-area-floor-picker {
|
||||
display: block;
|
||||
|
||||
Reference in New Issue
Block a user