mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-10 03:19:44 +00:00
Only display add button if at least one entity is selected in entities picker (#27699)
This commit is contained in:
@@ -147,7 +147,7 @@ class HaEntitiesPicker extends LitElement {
|
|||||||
.createDomains=${this.createDomains}
|
.createDomains=${this.createDomains}
|
||||||
.required=${this.required && !currentEntities.length}
|
.required=${this.required && !currentEntities.length}
|
||||||
@value-changed=${this._addEntity}
|
@value-changed=${this._addEntity}
|
||||||
add-button
|
.addButton=${currentEntities.length > 0}
|
||||||
></ha-entity-picker>
|
></ha-entity-picker>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ export class HaForm extends LitElement implements HaFormElement {
|
|||||||
.value=${getValue(this.data, item)}
|
.value=${getValue(this.data, item)}
|
||||||
.label=${this._computeLabel(item, this.data)}
|
.label=${this._computeLabel(item, this.data)}
|
||||||
.disabled=${item.disabled || this.disabled || false}
|
.disabled=${item.disabled || this.disabled || false}
|
||||||
.placeholder=${item.required ? "" : item.default}
|
.placeholder=${item.required ? undefined : item.default}
|
||||||
.helper=${this._computeHelper(item)}
|
.helper=${this._computeHelper(item)}
|
||||||
.localizeValue=${this.localizeValue}
|
.localizeValue=${this.localizeValue}
|
||||||
.required=${item.required || false}
|
.required=${item.required || false}
|
||||||
|
|||||||
Reference in New Issue
Block a user