From 7232c5129041b907126c1ad9b059b105b04625e6 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 21 May 2015 15:59:35 +0930 Subject: [PATCH] Fix notification grid row/column not toggling when first cell is disabled --- .../core/js/forum/src/components/notification-grid.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/framework/core/js/forum/src/components/notification-grid.js b/framework/core/js/forum/src/components/notification-grid.js index ee89179be..e5c24777f 100644 --- a/framework/core/js/forum/src/components/notification-grid.js +++ b/framework/core/js/forum/src/components/notification-grid.js @@ -72,10 +72,8 @@ export default class NotificationGrid extends Component { var enabled = !preferences[keys[0]]; keys.forEach(key => { var control = this.inputs[key]; - if (!control.props.disabled) { - control.loading(true); - preferences[key] = control.props.state = enabled; - } + control.loading(true); + preferences[key] = control.props.state = enabled; }); m.redraw(); @@ -86,12 +84,12 @@ export default class NotificationGrid extends Component { } toggleMethod(method) { - var keys = this.props.types.map(type => this.key(type.name, method)); + var keys = this.props.types.map(type => this.key(type.name, method)).filter(key => !this.inputs[key].props.disabled); this.toggle(keys); } toggleType(type) { - var keys = this.methods.map(method => this.key(type, method.name)); + var keys = this.methods.map(method => this.key(type, method.name)).filter(key => !this.inputs[key].props.disabled); this.toggle(keys); } }