aboutsummaryrefslogtreecommitdiffstats
path: root/interface
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2025-01-25 18:06:29 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2025-01-25 18:06:29 +0300
commit4d8ac2246352b89e324dfd2627189799ac12db59 (patch)
treeb7440756af5cf4f9bf5ae69ed34d0a9556103815 /interface
parent6f56e4858fab8db151766e023656be3cb8269427 (diff)
downloadrspamd-4d8ac2246352b89e324dfd2627189799ac12db59.tar.gz
rspamd-4d8ac2246352b89e324dfd2627189799ac12db59.zip
[WebUI] Reset dropdown when clearing filters
Ensure the action dropdown resets to its default value when clearing filters in the history table.
Diffstat (limited to 'interface')
-rw-r--r--interface/js/app/libft.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/interface/js/app/libft.js b/interface/js/app/libft.js
index 7106516a2..ca2a1ebef 100644
--- a/interface/js/app/libft.js
+++ b/interface/js/app/libft.js
@@ -318,6 +318,13 @@ define(["jquery", "app/common", "footable"],
self.removeFilter("action");
}
self.filter();
+ },
+ draw: function () {
+ // Ensure the dropdown reflects the default value when filters are cleared.
+ this._super();
+ const actionFilter = this.find("action");
+ const isActionFilterApplied = actionFilter instanceof FooTable.Filter;
+ if (this.$action && !isActionFilterApplied) this.$action.val(this.def);
}
});
/* eslint-enable consistent-this, no-underscore-dangle */