From ac31460bac3c050abe1e45ec975f3537d1937751 Mon Sep 17 00:00:00 2001 From: jelemux Date: Thu, 18 Feb 2021 19:55:42 +0100 Subject: add delete buttons --- src/view/property_group.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/view/property_group.rs') diff --git a/src/view/property_group.rs b/src/view/property_group.rs index f4b62a4..1905cac 100644 --- a/src/view/property_group.rs +++ b/src/view/property_group.rs @@ -9,6 +9,7 @@ pub struct InputProps< M: 'static + PartialEq + Clone, > { pub generated: Callback, + pub delete: Callback<()>, pub weak_link: WeakComponentLink>, } @@ -43,12 +44,20 @@ impl, M: 'static + PartialEq + Clo } fn view(&self) -> yew::virtual_dom::VNode { let link = self.props.weak_link.borrow().clone().unwrap(); + let delete = self.props.delete.clone(); html! {
{ self.render_error() } -

{ self.value.get_title() }

+
+
+

{ self.value.get_title() }

+
+
+ +
+
{ self.value.render(&link) } -- cgit v1.2.3