Chart click-to-filter now merges into the current query string (#29)

gotoFilter() built a brand-new URLSearchParams containing only the
clicked chart segment's filter keys, discarding every other active
filter (search text, date range, saved-filter selection, etc.) on
navigation. Now merges the segment's filter into the current
location.search, same fix approach already applied to #22.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGDKHiU5RJdo3dqQUDow3X
This commit is contained in:
2026-09-08 10:44:10 -04:00
co-authored by Claude Sonnet 5
parent 1ab4d01a3a
commit 2bda603647
+2 -1
View File
@@ -292,9 +292,10 @@ include __DIR__ . '/layout_header.php';
}
function gotoFilter(params) {
var qs = new URLSearchParams();
var qs = new URLSearchParams(window.location.search);
Object.keys(params).forEach(function(k) {
if (params[k] !== null && params[k] !== undefined && params[k] !== '') qs.set(k, params[k]);
else qs.delete(k);
});
window.location.href = '/?' + qs.toString();
}