]> git.proxmox.com Git - ui/proxmox-yew-widget-toolkit.git/commitdiff
MessageBox: use correct builder macro for on_close
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 23 Nov 2023 17:09:23 +0000 (18:09 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 23 Nov 2023 17:09:23 +0000 (18:09 +0100)
src/widget/message_box.rs

index f395567c364f059f06889c3d47522277d8620603..16bec4131a7d3f42a7dc769c81fff76c57af6121 100644 (file)
@@ -3,6 +3,7 @@ use std::rc::Rc;
 use pwt_macros::builder;
 use yew::prelude::*;
 use yew::virtual_dom::{VComp, VNode};
+use yew::html::IntoEventCallback;
 
 use crate::prelude::*;
 use crate::widget::{Button, Dialog, Row, Toolbar};
@@ -14,17 +15,21 @@ pub struct MessageBox {
     /// Dialog title
     #[builder]
     pub title: AttrValue,
+
     /// The error message.
     #[builder]
     pub message: Html,
+
     /// Close window callback.
-    #[builder_cb(Into, into, Option<Callback<bool>>)]
+    #[builder_cb(IntoEventCallback, into_event_callback, bool)]
     #[prop_or_default]
     pub on_close: Option<Callback<bool>>,
+
     /// Enable/disable dragging
     #[prop_or(true)]
     #[builder]
     pub draggable: bool,
+
     /// Button Style, defaults to a single 'Continue' button
     #[prop_or_default]
     #[builder]