feat: improve new tag handling #3035

This commit is contained in:
Johannes Millan 2024-02-26 12:03:21 +01:00
parent 34ba6aec95
commit 1bbe6712c2

View file

@ -54,7 +54,11 @@ export class DialogEditTagsForTaskComponent implements OnDestroy {
}
addNewTag(title: string): void {
const id = this._tagService.addTag({ title });
const cleanTitle = (t: string): string => {
return t.replace('#', '');
};
const id = this._tagService.addTag({ title: cleanTitle(title) });
this._updateTags(unique([...this.tagIds, id]));
}