From 4d8ac2246352b89e324dfd2627189799ac12db59 Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Sat, 25 Jan 2025 18:06:29 +0300 Subject: [PATCH] [WebUI] Reset dropdown when clearing filters Ensure the action dropdown resets to its default value when clearing filters in the history table. --- interface/js/app/libft.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/interface/js/app/libft.js b/interface/js/app/libft.js index 7106516a2b..ca2a1ebef2 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 */ -- 2.47.3