WebUI: Reset filter selection when double clicking filter

When double clicking on a filter, all other filters will be reset. For example, double clicking on a status filter will reset the categories, tags, and trackers filters to "All". This behavior can be disabled in WebUI options.

Closes #22449.
PR #22818.
This commit is contained in:
Thomas Piccirello
2025-06-09 06:24:58 -07:00
committed by GitHub
parent 78fae0ae76
commit 7ed026ef78
4 changed files with 63 additions and 7 deletions

View File

@@ -970,7 +970,7 @@ const initializeWindows = () => {
if (!response.ok)
return;
setCategoryFilter(CATEGORIES_ALL);
window.qBittorrent.Filters.clearCategoryFilter();
updateMainData();
});
};
@@ -991,7 +991,7 @@ const initializeWindows = () => {
if (!response.ok)
return;
setCategoryFilter(CATEGORIES_ALL);
window.qBittorrent.Filters.clearCategoryFilter();
updateMainData();
});
};
@@ -1077,7 +1077,7 @@ const initializeWindows = () => {
tags: tag
})
});
setTagFilter(TAGS_ALL);
window.qBittorrent.Filters.clearTagFilter();
};
deleteUnusedTagsFN = () => {
@@ -1092,7 +1092,7 @@ const initializeWindows = () => {
tags: tags.join(",")
})
});
setTagFilter(TAGS_ALL);
window.qBittorrent.Filters.clearTagFilter();
};
deleteTrackerFN = (trackerHost) => {
@@ -1121,7 +1121,7 @@ const initializeWindows = () => {
height: 100,
onCloseComplete: () => {
updateMainData();
setTrackerFilter(TRACKERS_ALL);
window.qBittorrent.Filters.clearTrackerFilter();
}
});
};