101353: Fix VocabularyTreeview onSelect being called twice

This commit is contained in:
Nona Luypaert
2023-04-26 18:37:55 +02:00
parent 14b053b704
commit bb242d99a6

View File

@@ -33,7 +33,9 @@
container="body" container="body"
(click)="onSelect(node.item)"> (click)="onSelect(node.item)">
<span *ngIf="multiSelect" class="form-check"> <span *ngIf="multiSelect" class="form-check">
<input class="form-check-input" type="checkbox" id="leaf-node-checkbox_{{node.item.id}}" [checked]="node.isSelected"> <!-- checkbox (click) needs to be stopped, to prevent that button (click) gets called twice -->
<input class="form-check-input" type="checkbox" id="leaf-node-checkbox_{{node.item.id}}"
[checked]="node.isSelected" (click)="$event.stopPropagation()">
<label class="form-check-label" for="leaf-node-checkbox_{{node.item.id}}">{{node.item.display}}</label> <label class="form-check-label" for="leaf-node-checkbox_{{node.item.id}}">{{node.item.display}}</label>
</span> </span>
<span *ngIf="!multiSelect">{{node.item.display}}</span> <span *ngIf="!multiSelect">{{node.item.display}}</span>
@@ -57,7 +59,9 @@
container="body" container="body"
(click)="onSelect(node.item)"> (click)="onSelect(node.item)">
<span *ngIf="multiSelect" class="form-check"> <span *ngIf="multiSelect" class="form-check">
<input class="form-check-input" type="checkbox" id="expandable-node-checkbox_{{node.item.id}}" [checked]="node.isSelected"> <!-- checkbox (click) needs to be stopped, to prevent that button (click) gets called twice -->
<input class="form-check-input" type="checkbox" id="expandable-node-checkbox_{{node.item.id}}"
[checked]="node.isSelected" (click)="$event.stopPropagation()">
<label class="form-check-label" for="expandable-node-checkbox_{{node.item.id}}">{{node.item.display}}</label> <label class="form-check-label" for="expandable-node-checkbox_{{node.item.id}}">{{node.item.display}}</label>
</span> </span>
<span *ngIf="!multiSelect">{{node.item.display}}</span> <span *ngIf="!multiSelect">{{node.item.display}}</span>