mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Fix notification grid row/column not toggling when first cell is disabled
This commit is contained in:
parent
7399c75374
commit
7232c51290
|
@ -72,10 +72,8 @@ export default class NotificationGrid extends Component {
|
||||||
var enabled = !preferences[keys[0]];
|
var enabled = !preferences[keys[0]];
|
||||||
keys.forEach(key => {
|
keys.forEach(key => {
|
||||||
var control = this.inputs[key];
|
var control = this.inputs[key];
|
||||||
if (!control.props.disabled) {
|
control.loading(true);
|
||||||
control.loading(true);
|
preferences[key] = control.props.state = enabled;
|
||||||
preferences[key] = control.props.state = enabled;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
m.redraw();
|
m.redraw();
|
||||||
|
|
||||||
|
@ -86,12 +84,12 @@ export default class NotificationGrid extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleMethod(method) {
|
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);
|
this.toggle(keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleType(type) {
|
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);
|
this.toggle(keys);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user