mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix potential undefined select element in color picker (#22212)
This commit is contained in:
parent
35aafd45dc
commit
2dd4090db3
@ -33,12 +33,12 @@ export class HaColorPicker extends LitElement {
|
|||||||
|
|
||||||
@property({ type: Boolean }) public disabled = false;
|
@property({ type: Boolean }) public disabled = false;
|
||||||
|
|
||||||
@query("ha-select") private _select!: HaSelect;
|
@query("ha-select") private _select?: HaSelect;
|
||||||
|
|
||||||
connectedCallback(): void {
|
connectedCallback(): void {
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
// Refresh layout options when the field is connected to the DOM to ensure current value displayed
|
// Refresh layout options when the field is connected to the DOM to ensure current value displayed
|
||||||
this._select.layoutOptions();
|
this._select?.layoutOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
private _valueSelected(ev) {
|
private _valueSelected(ev) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user