From 451bf8dc841b8f60f2a5664b0e8000ad40dfe114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 12 Nov 2020 00:48:40 +0100 Subject: [PATCH] Implement event capturing for `Row` --- native/src/widget/row.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs index 7d7595f7..6b09d0c8 100644 --- a/native/src/widget/row.rs +++ b/native/src/widget/row.rs @@ -163,20 +163,20 @@ where renderer: &Renderer, clipboard: Option<&dyn Clipboard>, ) -> event::Status { - self.children.iter_mut().zip(layout.children()).for_each( - |(child, layout)| { - let _ = child.widget.on_event( + self.children + .iter_mut() + .zip(layout.children()) + .map(|(child, layout)| { + child.widget.on_event( event.clone(), layout, cursor_position, messages, renderer, clipboard, - ); - }, - ); - - event::Status::Ignored + ) + }) + .fold(event::Status::Ignored, event::Status::merge) } fn draw(