mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 09:54:41 -05:00
fix: prevent sibling over-notification due to #3799)
This commit is contained in:
@@ -116,8 +116,10 @@ where
|
||||
}
|
||||
|
||||
fn writer(&self) -> Option<Self::Writer> {
|
||||
let mut parent = self.inner.writer()?;
|
||||
parent.untrack();
|
||||
let triggers = self.triggers_for_current_path();
|
||||
let guard = WriteGuard::new(triggers, self.inner.writer()?);
|
||||
let guard = WriteGuard::new(triggers, parent);
|
||||
Some(MappedMut::new(guard, self.read, self.write))
|
||||
}
|
||||
|
||||
@@ -464,7 +466,8 @@ where
|
||||
}
|
||||
|
||||
fn writer(&self) -> Option<Self::Writer> {
|
||||
let inner = self.inner.writer()?;
|
||||
let mut inner = self.inner.writer()?;
|
||||
inner.untrack();
|
||||
let inner_path = self.inner.path().into_iter().collect::<StorePath>();
|
||||
let keys = self
|
||||
.inner
|
||||
|
||||
@@ -94,7 +94,13 @@ where
|
||||
}
|
||||
|
||||
fn writer(&self) -> Option<Self::Writer> {
|
||||
let parent = self.inner.writer()?;
|
||||
let mut parent = self.inner.writer()?;
|
||||
|
||||
// we will manually include all the parent and ancestor `children` triggers
|
||||
// in triggers_for_current_path() below. we want to untrack the parent writer
|
||||
// so that it doesn't notify on the parent's `this` trigger, which would notify our
|
||||
// siblings too
|
||||
parent.untrack();
|
||||
let triggers = self.triggers_for_current_path();
|
||||
let guard = WriteGuard::new(triggers, parent);
|
||||
Some(MappedMut::new(guard, self.read, self.write))
|
||||
|
||||
Reference in New Issue
Block a user