mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 16:26:43 +00:00
Fix select issues (#13839)
This commit is contained in:
parent
8e245c8a83
commit
7336c1280f
@ -41,7 +41,7 @@ export class HaSelectSelector extends LitElement {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!this.selector.select.custom_value && this._mode === "list") {
|
if (!this.selector.select.custom_value && this._mode === "list") {
|
||||||
if (!this.selector.select.multiple || this.required) {
|
if (!this.selector.select.multiple) {
|
||||||
return html`
|
return html`
|
||||||
<div>
|
<div>
|
||||||
${this.label}
|
${this.label}
|
||||||
@ -64,7 +64,8 @@ export class HaSelectSelector extends LitElement {
|
|||||||
|
|
||||||
return html`
|
return html`
|
||||||
<div>
|
<div>
|
||||||
${this.label}${options.map(
|
${this.label}
|
||||||
|
${options.map(
|
||||||
(item: SelectOption) => html`
|
(item: SelectOption) => html`
|
||||||
<ha-formfield .label=${item.label}>
|
<ha-formfield .label=${item.label}>
|
||||||
<ha-checkbox
|
<ha-checkbox
|
||||||
@ -114,7 +115,7 @@ export class HaSelectSelector extends LitElement {
|
|||||||
.required=${this.required && !value.length}
|
.required=${this.required && !value.length}
|
||||||
.value=${this._filter}
|
.value=${this._filter}
|
||||||
.items=${options.filter(
|
.items=${options.filter(
|
||||||
(item) => !item.disabled && !this.value?.includes(item.value)
|
(option) => !option.disabled && !value?.includes(option.value)
|
||||||
)}
|
)}
|
||||||
@filter-changed=${this._filterChanged}
|
@filter-changed=${this._filterChanged}
|
||||||
@value-changed=${this._comboBoxValueChanged}
|
@value-changed=${this._comboBoxValueChanged}
|
||||||
@ -290,6 +291,9 @@ export class HaSelectSelector extends LitElement {
|
|||||||
ha-formfield {
|
ha-formfield {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
mwc-list-item[disabled] {
|
||||||
|
--mdc-theme-text-primary-on-background: var(--disabled-text-color);
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user