mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Scroll to new added trigger/condition/row (#13473)
This commit is contained in:
parent
c2542a3baa
commit
d64ade3848
@ -92,8 +92,11 @@ export default class HaAutomationAction extends LitElement {
|
|||||||
const row = this.shadowRoot!.querySelector<HaAutomationActionRow>(
|
const row = this.shadowRoot!.querySelector<HaAutomationActionRow>(
|
||||||
"ha-automation-action-row:last-of-type"
|
"ha-automation-action-row:last-of-type"
|
||||||
)!;
|
)!;
|
||||||
|
row.updateComplete.then(() => {
|
||||||
row.expand();
|
row.expand();
|
||||||
|
row.scrollIntoView();
|
||||||
row.focus();
|
row.focus();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,6 +181,7 @@ export default class HaAutomationAction extends LitElement {
|
|||||||
ha-automation-action-row {
|
ha-automation-action-row {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
scroll-margin-top: 48px;
|
||||||
}
|
}
|
||||||
ha-svg-icon {
|
ha-svg-icon {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
@ -69,8 +69,11 @@ export default class HaAutomationCondition extends LitElement {
|
|||||||
const row = this.shadowRoot!.querySelector<HaAutomationConditionRow>(
|
const row = this.shadowRoot!.querySelector<HaAutomationConditionRow>(
|
||||||
"ha-automation-condition-row:last-of-type"
|
"ha-automation-condition-row:last-of-type"
|
||||||
)!;
|
)!;
|
||||||
|
row.updateComplete.then(() => {
|
||||||
row.expand();
|
row.expand();
|
||||||
|
row.scrollIntoView();
|
||||||
row.focus();
|
row.focus();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,6 +190,7 @@ export default class HaAutomationCondition extends LitElement {
|
|||||||
ha-automation-condition-row {
|
ha-automation-condition-row {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
scroll-margin-top: 48px;
|
||||||
}
|
}
|
||||||
ha-svg-icon {
|
ha-svg-icon {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
@ -88,8 +88,11 @@ export default class HaAutomationTrigger extends LitElement {
|
|||||||
const row = this.shadowRoot!.querySelector<HaAutomationTriggerRow>(
|
const row = this.shadowRoot!.querySelector<HaAutomationTriggerRow>(
|
||||||
"ha-automation-trigger-row:last-of-type"
|
"ha-automation-trigger-row:last-of-type"
|
||||||
)!;
|
)!;
|
||||||
|
row.updateComplete.then(() => {
|
||||||
row.expand();
|
row.expand();
|
||||||
|
row.scrollIntoView();
|
||||||
row.focus();
|
row.focus();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,6 +170,7 @@ export default class HaAutomationTrigger extends LitElement {
|
|||||||
ha-automation-trigger-row {
|
ha-automation-trigger-row {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
scroll-margin-top: 48px;
|
||||||
}
|
}
|
||||||
ha-svg-icon {
|
ha-svg-icon {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user