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); + } }