diff --git a/frontend/index.html b/frontend/index.html
index bdb5353..3eb3159 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -81,7 +81,7 @@
-
+
-
+
@@ -160,7 +160,7 @@ pub fn StatusBar() -> impl IntoView {
// --- UPLOAD SPEED DROPDOWN ---
-
+
@@ -202,7 +202,7 @@ pub fn StatusBar() -> impl IntoView {
-
+
diff --git a/frontend/src/components/torrent/table.rs b/frontend/src/components/torrent/table.rs
index eb3d8a8..a5d2dc7 100644
--- a/frontend/src/components/torrent/table.rs
+++ b/frontend/src/components/torrent/table.rs
@@ -164,10 +164,13 @@ pub fn TorrentTable() -> impl IntoView {
}
};
- // Signal-based sort dropdown for mobile
- let (sort_open, set_sort_open) = create_signal(false);
- let sort_menu_ref = create_node_ref::();
- let _ = on_click_outside(sort_menu_ref, move |_| set_sort_open.set(false));
+ // Refs for click outside detection
+ let sort_details_ref = create_node_ref::();
+ let _ = on_click_outside(sort_details_ref, move |_| {
+ if let Some(el) = sort_details_ref.get_untracked() {
+ el.set_open(false);
+ }
+ });
let sort_arrow = move |col: SortColumn| {
if sort_col.get() == col {
@@ -346,24 +349,16 @@ pub fn TorrentTable() -> impl IntoView {
"Torrents"
-
-
-
+
+
+
+
+
{
let columns = vec![
@@ -388,7 +383,9 @@ pub fn TorrentTable() -> impl IntoView {
class=move || if is_active() { "bg-primary/10 text-primary font-bold flex justify-between" } else { "flex justify-between" }
on:click=move |_| {
handle_sort(col);
- set_sort_open.set(false);
+ if let Some(el) = sort_details_ref.get_untracked() {
+ el.set_open(false);
+ }
}
>
{label}
@@ -406,7 +403,7 @@ pub fn TorrentTable() -> impl IntoView {
}).collect::>()
}
-
+
{move || filtered_torrents().into_iter().map(|t| {