Skip to content
Snippets Groups Projects
Commit 91465a8a authored by Lars Wächter's avatar Lars Wächter
Browse files

Check 'select all' when all keywords are selected

parent 494ec994
Branches
Tags
No related merge requests found
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
id="checkAll" id="checkAll"
(change)="selectAll(checkall.checked)" (change)="selectAll(checkall.checked)"
#checkall #checkall
[checked]="allKeywordsSelected()"
matTooltip="{{ 'spacy-dialog.select-all-hint' | translate }}" matTooltip="{{ 'spacy-dialog.select-all-hint' | translate }}"
matTooltipShowDelay="750"> matTooltipShowDelay="750">
</mat-checkbox> </mat-checkbox>
......
...@@ -119,6 +119,15 @@ export class SpacyDialogComponent implements OnInit, AfterContentInit { ...@@ -119,6 +119,15 @@ export class SpacyDialogComponent implements OnInit, AfterContentInit {
} }
} }
allKeywordsSelected(): boolean {
for(const kw of this.keywords) {
if(!kw.selected) {
return false;
}
}
return true;
}
manualKeywordsToKeywords(){ manualKeywordsToKeywords(){
const tempKeywords = this.manualKeywords.replace(/\s/g,''); const tempKeywords = this.manualKeywords.replace(/\s/g,'');
if(tempKeywords.length) { if(tempKeywords.length) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment