mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-22 22:09:22 -05:00
fix: Scrollbar nested update value (#238)
This commit is contained in:
parent
74bf7fa29a
commit
97212d7fda
1 changed files with 14 additions and 14 deletions
|
@ -198,14 +198,14 @@ pub fn Scrollbar(
|
|||
handle.remove();
|
||||
}
|
||||
});
|
||||
thumb_status.update_value(|thumb_status| {
|
||||
if let Some(status) = thumb_status.take() {
|
||||
if status == ThumbStatus::DelayLeave {
|
||||
is_show_x_thumb.set(false);
|
||||
is_show_y_thumb.set(false);
|
||||
}
|
||||
if let Some(Some(status)) =
|
||||
thumb_status.try_update_value(|thumb_status| thumb_status.take())
|
||||
{
|
||||
if status == ThumbStatus::DelayLeave {
|
||||
is_show_x_thumb.set(false);
|
||||
is_show_y_thumb.set(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
x_trumb_mouseup_handle.set_value(Some(handle));
|
||||
memo_x_left.set_value(container_scroll_left.get());
|
||||
|
@ -251,14 +251,14 @@ pub fn Scrollbar(
|
|||
handle.remove();
|
||||
}
|
||||
});
|
||||
thumb_status.update_value(|thumb_status| {
|
||||
if let Some(status) = thumb_status.take() {
|
||||
if status == ThumbStatus::DelayLeave {
|
||||
is_show_x_thumb.set(false);
|
||||
is_show_y_thumb.set(false);
|
||||
}
|
||||
if let Some(Some(status)) =
|
||||
thumb_status.try_update_value(|thumb_status| thumb_status.take())
|
||||
{
|
||||
if status == ThumbStatus::DelayLeave {
|
||||
is_show_x_thumb.set(false);
|
||||
is_show_y_thumb.set(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
y_trumb_mouseup_handle.set_value(Some(handle));
|
||||
memo_y_top.set_value(container_scroll_top.get());
|
||||
|
|
Loading…
Add table
Reference in a new issue