Fix issue with multiple tags in the search expression

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent be2608223c
commit a276a37d3d

@ -50,10 +50,15 @@ export class FileSearchComponent implements AfterViewChecked {
public addSearchTag(tag: string) {
if (tag.startsWith("-")) {
this.searchTags.push(new TagQuery(tag.replace(/^-/g, ''), true));
tag = tag.replace(/^-/g, '');
this.searchTags.push(new TagQuery(tag, true));
} else {
this.searchTags.push(new TagQuery(tag, false));
}
if (this.searchTags.filter(t => t.name === tag).length > 1) {
const index = this.searchTags.findIndex(t => t.name === tag);
this.searchTags.splice(index, 1);
}
}
async removeAllSearchTags() {

@ -1,5 +1,5 @@
<mat-drawer-container class="page">
<mat-drawer mode="side" opened>
<mat-drawer mode="side" opened disableClose>
<div fxLayout="column" class="drawer-sidebar-inner">
<div id="file-search-input" fxFlex="150px">
<app-file-search #filesearch></app-file-search>

Loading…
Cancel
Save