mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-22 22:09:22 -05:00
fix: nightly mode Message error
This commit is contained in:
parent
7a1a8a0d9e
commit
a7f873ad29
1 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ fn Message(message: MessageType, #[prop(into)] on_close: Callback<Uuid, ()>) ->
|
|||
});
|
||||
let style = theme.with_untracked(|theme| format!("color: {};", variant.theme_color(theme)));
|
||||
|
||||
let on_before_leave = move |_| {
|
||||
let on_before_leave = Callback::new(move |_| {
|
||||
let Some(node_el) = message_ref.get() else {
|
||||
return;
|
||||
};
|
||||
|
@ -71,7 +71,7 @@ fn Message(message: MessageType, #[prop(into)] on_close: Callback<Uuid, ()>) ->
|
|||
let el = any_el.deref();
|
||||
let style = el.style();
|
||||
let _ = style.set_property("max-height", &format!("{}px", el.offset_height()));
|
||||
};
|
||||
});
|
||||
let on_after_leave = Callback::new(move |_| {
|
||||
queue_microtask(move || on_close.call(id));
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue