mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
fix: allow Suspense to remount before rebuilding (closes #2721)
This commit is contained in:
parent
a6a65ba562
commit
29b0dca1d8
1 changed files with 4 additions and 0 deletions
|
@ -151,6 +151,10 @@ where
|
|||
async move {
|
||||
let value = fut.await;
|
||||
drop(id);
|
||||
// waiting a tick here allows Suspense to remount if necessary, which prevents some
|
||||
// edge cases in which a rebuild can't happen while unmounted because the DOM node
|
||||
// has no parent
|
||||
any_spawner::Executor::tick().await;
|
||||
Some(value).rebuild(&mut *state.borrow_mut());
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue