mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 12:26:35 +00:00
Only show loading for slow flow steps to avoid flickering (#26131)
This commit is contained in:
parent
1ded254e5a
commit
9134132ba9
@ -438,7 +438,10 @@ class DataEntryFlowDialog extends LitElement {
|
||||
return;
|
||||
}
|
||||
|
||||
this._loading = "loading_step";
|
||||
const delayedLoading = setTimeout(() => {
|
||||
// only show loading for slow steps to avoid flickering
|
||||
this._loading = "loading_step";
|
||||
}, 250);
|
||||
let _step: DataEntryFlowStep;
|
||||
try {
|
||||
_step = await step;
|
||||
@ -452,6 +455,7 @@ class DataEntryFlowDialog extends LitElement {
|
||||
});
|
||||
return;
|
||||
} finally {
|
||||
clearTimeout(delayedLoading);
|
||||
this._loading = undefined;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user