mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +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>(
|
||||
"ha-automation-action-row:last-of-type"
|
||||
)!;
|
||||
row.expand();
|
||||
row.focus();
|
||||
row.updateComplete.then(() => {
|
||||
row.expand();
|
||||
row.scrollIntoView();
|
||||
row.focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,6 +181,7 @@ export default class HaAutomationAction extends LitElement {
|
||||
ha-automation-action-row {
|
||||
display: block;
|
||||
margin-bottom: 16px;
|
||||
scroll-margin-top: 48px;
|
||||
}
|
||||
ha-svg-icon {
|
||||
height: 20px;
|
||||
|
@ -69,8 +69,11 @@ export default class HaAutomationCondition extends LitElement {
|
||||
const row = this.shadowRoot!.querySelector<HaAutomationConditionRow>(
|
||||
"ha-automation-condition-row:last-of-type"
|
||||
)!;
|
||||
row.expand();
|
||||
row.focus();
|
||||
row.updateComplete.then(() => {
|
||||
row.expand();
|
||||
row.scrollIntoView();
|
||||
row.focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,6 +190,7 @@ export default class HaAutomationCondition extends LitElement {
|
||||
ha-automation-condition-row {
|
||||
display: block;
|
||||
margin-bottom: 16px;
|
||||
scroll-margin-top: 48px;
|
||||
}
|
||||
ha-svg-icon {
|
||||
height: 20px;
|
||||
|
@ -88,8 +88,11 @@ export default class HaAutomationTrigger extends LitElement {
|
||||
const row = this.shadowRoot!.querySelector<HaAutomationTriggerRow>(
|
||||
"ha-automation-trigger-row:last-of-type"
|
||||
)!;
|
||||
row.expand();
|
||||
row.focus();
|
||||
row.updateComplete.then(() => {
|
||||
row.expand();
|
||||
row.scrollIntoView();
|
||||
row.focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,6 +170,7 @@ export default class HaAutomationTrigger extends LitElement {
|
||||
ha-automation-trigger-row {
|
||||
display: block;
|
||||
margin-bottom: 16px;
|
||||
scroll-margin-top: 48px;
|
||||
}
|
||||
ha-svg-icon {
|
||||
height: 20px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user