From d6d732cf91d44a47a47e3a69a5f21956aece0200 Mon Sep 17 00:00:00 2001 From: Ejaaz Khan Date: Tue, 7 Apr 2026 15:56:43 +0530 Subject: [PATCH] fix: hide widget not working --- frappe/public/js/frappe/widgets/base_widget.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frappe/public/js/frappe/widgets/base_widget.js b/frappe/public/js/frappe/widgets/base_widget.js index 4b460abab1..563d4fc5ed 100644 --- a/frappe/public/js/frappe/widgets/base_widget.js +++ b/frappe/public/js/frappe/widgets/base_widget.js @@ -4,6 +4,7 @@ export default class Widget { constructor(opts) { Object.assign(this, opts); this.make(); + this.apply_hidden_state(); } refresh() { @@ -197,4 +198,10 @@ export default class Widget { set_footer() { // } + + apply_hidden_state() { + const is_hidden = Boolean(this.hidden); + const show_for_customize = is_hidden && this.in_customize_mode; + this.widget.toggleClass("hidden", is_hidden && !show_for_customize); + } }