Skip to content

Commit ab35841

Browse files
Rename removeLabel
1 parent ed923bf commit ab35841

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

frontend/src/app/annotate/annotation-input/problem-details/problem-labels/manage-labels-modal/manage-labels-modal.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ <h6 i18n>Attached labels</h6>
1919
</tr>
2020
</thead>
2121
<tbody>
22-
@for (annotation of shownLabels$ | async; track
23-
annotation.label.id) {
22+
@for (annotation of shownLabels$ | async; track annotation.label.id)
23+
{
2424
<tr
2525
[class.clickable-row]="annotation.removable"
2626
(click)="
2727
annotation.removable
28-
? removeLabelAnnotation(annotation)
28+
? removeLabel(annotation.label.id)
2929
: null
3030
"
3131
>

frontend/src/app/annotate/annotation-input/problem-details/problem-labels/manage-labels-modal/manage-labels-modal.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ export class ManageLabelsModalComponent implements OnInit {
119119
});
120120
}
121121

122-
public removeLabelAnnotation(annotation: LabelAnnotation): void {
122+
public removeLabel(labelId: number): void {
123123
const currentSelected = this.form.controls.selectedLabelIds.value;
124124
this.form.controls.selectedLabelIds.setValue(
125-
currentSelected.filter(id => id !== annotation.label.id)
125+
currentSelected.filter(id => id !== labelId)
126126
);
127127
}
128128

0 commit comments

Comments
 (0)