From f7fbb485d88c6f04b3457099f20cca1f1f804c47 Mon Sep 17 00:00:00 2001 From: Zach Leahan <54847203+ZacharyLeahan@users.noreply.github.com> Date: Tue, 27 May 2025 19:43:01 -0400 Subject: [PATCH] Fix clear all and multiple rule search --- src/components/Explorer.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/Explorer.vue b/src/components/Explorer.vue index 8c81b02..6f97f8b 100644 --- a/src/components/Explorer.vue +++ b/src/components/Explorer.vue @@ -1648,9 +1648,7 @@ export default { this.submit(); }, clearAll() { - for (const filter of this.filters) { - this.filterValues[filter.name] = filter.default; - } + this.filterValues = JSON.parse(JSON.stringify(this.defaultFilterValues)); this.q = ""; for (const name of this.appliedRules) { this.removeRuleFilters(name); @@ -1880,8 +1878,9 @@ ${htmlLines.join("\n")} function getDefaultFilterValues(filters) { return Object.fromEntries( filters.map((filter) => { - const value = [filter.name, filter.value]; - filter.default = filter.value; + const cloned = JSON.parse(JSON.stringify(filter.value)); + const value = [filter.name, cloned]; + filter.default = JSON.parse(JSON.stringify(filter.value)); delete filter.value; return value; })