From eab011070d7975b228347ef9cc91533293ce480a Mon Sep 17 00:00:00 2001 From: Ethan Girouard Date: Tue, 30 Jul 2024 21:46:59 -0400 Subject: [PATCH] Don't track scroll_element in scroll button handlers --- src/components/dashboard_row.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/dashboard_row.rs b/src/components/dashboard_row.rs index 10f1ee9..a85159c 100644 --- a/src/components/dashboard_row.rs +++ b/src/components/dashboard_row.rs @@ -29,7 +29,7 @@ impl IntoView for DashboardRow { // This is done by scrolling to the nearest multiple of the tile width, plus some for padding let scroll_left = move |_| { - if let Some(scroll_element) = list_ref.get() { + if let Some(scroll_element) = list_ref.get_untracked() { let client_width = scroll_element.client_width() as f64; let current_pos = scroll_element.scroll_left() as f64; let desired_pos = current_pos - client_width; @@ -49,7 +49,7 @@ impl IntoView for DashboardRow { }; let scroll_right = move |_| { - if let Some(scroll_element) = list_ref.get() { + if let Some(scroll_element) = list_ref.get_untracked() { let client_width = scroll_element.client_width() as f64; let current_pos = scroll_element.scroll_left() as f64; let desired_pos = current_pos + client_width;