diff --git a/src/component.rs b/src/component.rs index b9ea6e5..60758b5 100644 --- a/src/component.rs +++ b/src/component.rs @@ -93,6 +93,10 @@ impl Context { (i.lock().unwrap())(self, event); } } + + for (child, _) in self.children.lock().unwrap().iter() { + child.emit_event(event); + } } pub fn emit_event_threaded( @@ -109,6 +113,10 @@ impl Context { }); } } + + for (child, _) in self.children.lock().unwrap().iter() { + child.emit_event_threaded(event); + } } pub fn child) -> View + Send + Sync + 'static>(