Fixed unlcear behaviour when clearing matching context
@@ -124,12 +124,22 @@ function genComponentConf() {
}
resetMatchingContext() {
- this.addedContext = [];
+ this.addedContext = this.showOnlyCheckedContexts();
this.textfield().value = "";
this.onMatchingContextUpdated({ matchingContext: [] });
this.showResetButton = false;
}
+ showOnlyCheckedContexts() {
+ let checkedContext = [];
+ for (let box of this.defaultBoxes) {
+ if (box.selected) {
+ checkedContext.push(box.name);
+ }
+ }
+ return checkedContext;
+ }
+
restoreDefault() {
this.addedContext = this.defaultMatchingContext || [];
this.textfield().value = "";
