From 12a33eb6b815d1915335044bcd1a5c11d71c2287 Mon Sep 17 00:00:00 2001 From: _Bastler Date: Sat, 4 Dec 2021 21:25:08 +0100 Subject: [PATCH] fix tag search --- src/app/ui/tags/tagspicker.ui.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/ui/tags/tagspicker.ui.ts b/src/app/ui/tags/tagspicker.ui.ts index 97c1cd0..c7bffc6 100644 --- a/src/app/ui/tags/tagspicker.ui.ts +++ b/src/app/ui/tags/tagspicker.ui.ts @@ -33,7 +33,13 @@ export class UiTagsPicker implements OnInit { .valueChanges .pipe( debounceTime(300), - switchMap(value => this.tagsService.search(value)) + switchMap(value => { + if (value.startsWith('#')) { + value = value.replace('#', ''); + } + value = value.split('#').join('-'); + return this.tagsService.search(value); + }) ); this.tags = this.model || [];