Add tests for a component with optional callback
@@ -9,6 +9,7 @@ pub struct ChildProperties {
#[props(required)]
pub int: i32,
pub vec: Vec<i32>,
+ pub optional_callback: Option<Callback<()>>,
}
pub struct ChildComponent;
@@ -80,6 +81,13 @@ pass_helper! {
html! {
<ChildComponent int=1 string=name_expr />
};
+
+ html! {
+ <>
+ <ChildComponent int=1 />
+ <ChildComponent int=1 optional_callback=|_| () />
+ </>
+ };
}
fn main() {}
