mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Don't use selector inside choose action (#13705)
This commit is contained in:
parent
771733d326
commit
7696df56ac
@ -9,7 +9,6 @@ import { Action, ChooseAction } from "../../../../../data/script";
|
|||||||
import { haStyle } from "../../../../../resources/styles";
|
import { haStyle } from "../../../../../resources/styles";
|
||||||
import { HomeAssistant } from "../../../../../types";
|
import { HomeAssistant } from "../../../../../types";
|
||||||
import { ActionElement } from "../ha-automation-action-row";
|
import { ActionElement } from "../ha-automation-action-row";
|
||||||
import "../../../../../components/ha-form/ha-form";
|
|
||||||
|
|
||||||
@customElement("ha-automation-action-choose")
|
@customElement("ha-automation-action-choose")
|
||||||
export class HaChooseAction extends LitElement implements ActionElement {
|
export class HaChooseAction extends LitElement implements ActionElement {
|
||||||
@ -64,13 +63,13 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
|||||||
"ui.panel.config.automation.editor.actions.type.choose.sequence"
|
"ui.panel.config.automation.editor.actions.type.choose.sequence"
|
||||||
)}:
|
)}:
|
||||||
</h3>
|
</h3>
|
||||||
<ha-form
|
<ha-automation-action
|
||||||
|
.actions=${option.sequence || []}
|
||||||
|
.reOrderMode=${this.reOrderMode}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.schema=${[{ name: "sequence", selector: { action: {} } }]}
|
|
||||||
.data=${option}
|
|
||||||
.idx=${idx}
|
.idx=${idx}
|
||||||
@value-changed=${this._actionChanged}
|
@value-changed=${this._actionChanged}
|
||||||
></ha-form>
|
></ha-automation-action>
|
||||||
</div>
|
</div>
|
||||||
</ha-card>`
|
</ha-card>`
|
||||||
)}
|
)}
|
||||||
@ -126,7 +125,7 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
|||||||
|
|
||||||
private _actionChanged(ev: CustomEvent) {
|
private _actionChanged(ev: CustomEvent) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
const value = ev.detail.value.sequence as Action[];
|
const value = ev.detail.value as Action[];
|
||||||
const index = (ev.target as any).idx;
|
const index = (ev.target as any).idx;
|
||||||
const choose = this.action.choose
|
const choose = this.action.choose
|
||||||
? [...ensureArray(this.action.choose)]
|
? [...ensureArray(this.action.choose)]
|
||||||
@ -185,9 +184,6 @@ export class HaChooseAction extends LitElement implements ActionElement {
|
|||||||
right: 0;
|
right: 0;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
ha-form::part(root) {
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
ha-svg-icon {
|
ha-svg-icon {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user