fix: tracking a subfield should track its parents, as changing these can change it

This commit is contained in:
Greg Johnston 2024-08-26 20:28:08 -04:00
parent 2db3e4f4d8
commit d42163d888

View file

@ -151,11 +151,12 @@ where
impl<Inner, Prev, T> Track for Subfield<Inner, Prev, T>
where
Inner: StoreField<Value = Prev> + 'static,
Inner: StoreField<Value = Prev> + Track + 'static,
Prev: 'static,
T: 'static,
{
fn track(&self) {
self.inner.track();
let trigger = self.get_trigger(self.path().into_iter().collect());
trigger.track();
}