From fe4b434ed1f38ea55ece1832e4854753e7ce121a Mon Sep 17 00:00:00 2001 From: Daniel Idem Date: Tue, 3 Sep 2024 07:31:08 +0100 Subject: [PATCH] Fixed current tag typo --- .../lib/tags-selector/tags-selector.component.html | 2 +- .../src/lib/tags-selector/tags-selector.component.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libs/ui/src/lib/tags-selector/tags-selector.component.html b/libs/ui/src/lib/tags-selector/tags-selector.component.html index 3d55ced23..45235e0d6 100644 --- a/libs/ui/src/lib/tags-selector/tags-selector.component.html +++ b/libs/ui/src/lib/tags-selector/tags-selector.component.html @@ -16,7 +16,7 @@ name="close-outline" [matAutocomplete]="autocompleteTags" [matChipInputFor]="tagsChipList" - [(ngModel)]="currentFruit" + [(ngModel)]="currentTag" /> ; readonly tagsSignal = signal([{ id: '', name: '' }]); - readonly currentFruit = model(''); + readonly currentTag = model(''); readonly filteredTags = computed(() => { - const currentFruit = this.currentFruit().toLowerCase(); + const currentTag = this.currentTag().toLowerCase(); const aTags = this.tagsAvailable ?? [{ id: '', name: '' }]; const bTags = this.tagsSignal() ?? [{ id: '', name: '' }]; const cTags = aTags.filter((value) => !bTags.includes(value)); - return currentFruit - ? cTags.filter((tag) => tag.name.toLowerCase().includes(currentFruit)) + return currentTag + ? cTags.filter((tag) => tag.name.toLowerCase().includes(currentTag)) : cTags; }); @@ -80,7 +80,7 @@ export class GfTagsSelectorComponent implements OnInit { const newTag = this.tagsAvailable.find(({ id }) => id === tagId); if (this.tagsSignal()?.some((el) => el.id === tagId)) { - this.currentFruit.set(''); + this.currentTag.set(''); event.option.deselect(); return; } @@ -88,7 +88,7 @@ export class GfTagsSelectorComponent implements OnInit { this.tagsSignal() ? this.tagsSignal.update((tags) => [...tags, newTag]) : this.tagsSignal.update(() => [newTag]); - this.currentFruit.set(''); + this.currentTag.set(''); event.option.deselect(); }