Add send_self_batch to ComponentLink
@@ -441,6 +441,15 @@ where
pub fn send_self(&mut self, msg: COMP::Message) {
self.scope.send_message(msg);
}
+
+ /// Sends a batch of messages to the component to be processed immediately after
+ /// the component has been updated and/or rendered..
+ ///
+ /// All messages will first be processed by `update`, and if _any_ of them return `true`,
+ /// then re-render will occur.
+ pub fn send_self_batch(&mut self, msgs: Vec<COMP::Message>) {
+ self.scope.send_message_batch(msgs)
+ }
}
impl<COMP: Component> fmt::Debug for ComponentLink<COMP> {
