mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 22:36:35 +00:00
Fix select entity disabled when no item selected (#9465)
This commit is contained in:
parent
27730e65e7
commit
45436731e2
@ -17,7 +17,7 @@ import { computeDomain } from "../../../common/entity/compute_domain";
|
|||||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||||
import "../../../components/entity/state-badge";
|
import "../../../components/entity/state-badge";
|
||||||
import "../../../components/ha-paper-dropdown-menu";
|
import "../../../components/ha-paper-dropdown-menu";
|
||||||
import { UNAVAILABLE_STATES } from "../../../data/entity";
|
import { UNAVAILABLE } from "../../../data/entity";
|
||||||
import { forwardHaptic } from "../../../data/haptics";
|
import { forwardHaptic } from "../../../data/haptics";
|
||||||
import { SelectEntity, setSelectOption } from "../../../data/select";
|
import { SelectEntity, setSelectOption } from "../../../data/select";
|
||||||
import { ActionHandlerEvent } from "../../../data/lovelace";
|
import { ActionHandlerEvent } from "../../../data/lovelace";
|
||||||
@ -87,7 +87,7 @@ class HuiSelectEntityRow extends LitElement implements LovelaceRow {
|
|||||||
></state-badge>
|
></state-badge>
|
||||||
<ha-paper-dropdown-menu
|
<ha-paper-dropdown-menu
|
||||||
.label=${this._config.name || computeStateName(stateObj)}
|
.label=${this._config.name || computeStateName(stateObj)}
|
||||||
.disabled=${UNAVAILABLE_STATES.includes(stateObj.state)}
|
.disabled=${stateObj.state === UNAVAILABLE}
|
||||||
@iron-select=${this._selectedChanged}
|
@iron-select=${this._selectedChanged}
|
||||||
@click=${stopPropagation}
|
@click=${stopPropagation}
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user