diff --git a/src/app/shared/components/tags-input/tags-input.component.html b/src/app/shared/components/tags-input/tags-input.component.html
index 02f8c1488..8eab8fb4e 100644
--- a/src/app/shared/components/tags-input/tags-input.component.html
+++ b/src/app/shared/components/tags-input/tags-input.component.html
@@ -8,7 +8,7 @@
(click)="!readonly() && onContainerClick()"
(keydown)="!readonly() && onContainerKeydown($event)"
>
- @for (tag of localTags(); track $index) {
+ @for (tag of localTags(); track tag) {
}
diff --git a/src/app/shared/components/tags-input/tags-input.component.ts b/src/app/shared/components/tags-input/tags-input.component.ts
index 3c8ba3678..b7f8c5d6d 100644
--- a/src/app/shared/components/tags-input/tags-input.component.ts
+++ b/src/app/shared/components/tags-input/tags-input.component.ts
@@ -32,17 +32,12 @@ export class TagsInputComponent {
inputElement = viewChild>('tagInput');
localTags = signal([]);
- private isLocalUpdate = false;
constructor() {
effect(() => {
const incoming = this.tags();
- if (!this.isLocalUpdate) {
- this.localTags.set([...incoming]);
- }
-
- this.isLocalUpdate = false;
+ this.localTags.set([...incoming]);
});
}
@@ -92,8 +87,6 @@ export class TagsInputComponent {
const updatedTags = [...currentTags, normalizedValue];
this.localTags.set(updatedTags);
- this.isLocalUpdate = true;
-
this.tagsChanged.emit(updatedTags);
}
}
@@ -105,8 +98,6 @@ export class TagsInputComponent {
const updatedTags = currentTags.filter((_, i) => i !== index);
this.localTags.set(updatedTags);
- this.isLocalUpdate = true;
-
this.tagsChanged.emit(updatedTags);
}
}