Fix mwc-select in lovelace editors (#11708)

This commit is contained in:
Zack Barett 2022-02-17 03:41:45 -06:00 committed by GitHub
parent b55c7edd70
commit f923228078
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 3 deletions

View File

@ -28,7 +28,7 @@ export class HuiThemeSelectEditor extends LitElement {
@selected=${this._changed}
@closed=${stopPropagation}
fixedMenuPosition
naturalMenuWidt
naturalMenuWidth
>
<mwc-list-item value="remove"
>${this.hass!.localize(

View File

@ -91,6 +91,8 @@ export class HuiCalendarCardEditor
.configValue=${"initial_view"}
@selected=${this._viewChanged}
@closed=${stopPropagation}
naturalMenuWidth
fixedMenuPosition
>
${views.map(
(view) => html`

View File

@ -160,6 +160,8 @@ export class HuiConditionalCardEditor
.configValue=${"invert"}
@selected=${this._changeCondition}
@closed=${stopPropagation}
naturalMenuWidth
fixedMenuPosition
>
<mwc-list-item value="false">
${this.hass!.localize(

View File

@ -5,6 +5,7 @@ import { CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { customElement, property, state } from "lit/decorators";
import { assert } from "superstruct";
import { fireEvent } from "../../../../common/dom/fire_event";
import { stopPropagation } from "../../../../common/dom/stop_propagation";
import { computeDomain } from "../../../../common/entity/compute_domain";
import { domainIcon } from "../../../../common/entity/domain_icon";
import "../../../../components/ha-formfield";
@ -103,9 +104,12 @@ export class HuiGenericEntityRowEditor
</div>
<mwc-select
label="Secondary Info"
.selected=${this._config.secondary_info || "none"}
.configValue=${"secondary_info"}
@selected=${this._valueChanged}
@closed=${stopPropagation}
.value=${this._config.secondary_info || "none"}
naturalMenuWidth
fixedMenuPosition
>
<mwc-list-item value=""
>${this.hass!.localize(

View File

@ -335,6 +335,7 @@ export abstract class HuiElementEditor<T> extends LitElement {
);
}
} else {
this._guiSupported = false;
this.GUImode = false;
}
} catch (err: any) {

View File

@ -1,5 +1,4 @@
import "@material/mwc-list/mwc-list-item";
import "@material/mwc-select/mwc-select";
import {
css,
CSSResultGroup,