Skip to content

Commit

Permalink
101353: Fix VocabularyTreeview onSelect being called twice
Browse files Browse the repository at this point in the history
  • Loading branch information
nona-luypaert committed Apr 26, 2023
1 parent 14b053b commit bb242d9
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -33,7 +33,9 @@ <h4 *ngIf="!(loading | async) && dataSource.data.length === 0" class="text-cente
container="body"
(click)="onSelect(node.item)">
<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>
</span>
<span *ngIf="!multiSelect">{{node.item.display}}</span>
Expand All @@ -57,7 +59,9 @@ <h4 *ngIf="!(loading | async) && dataSource.data.length === 0" class="text-cente
container="body"
(click)="onSelect(node.item)">
<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>
</span>
<span *ngIf="!multiSelect">{{node.item.display}}</span>
Expand Down

0 comments on commit bb242d9

Please sign in to comment.