diff --git a/scilog/src/app/logbook/core/search-window/search-window.component.html b/scilog/src/app/logbook/core/search-window/search-window.component.html index 9ee94ad5..b95e98a4 100644 --- a/scilog/src/app/logbook/core/search-window/search-window.component.html +++ b/scilog/src/app/logbook/core/search-window/search-window.component.html @@ -28,24 +28,19 @@
Suggestions...
- Created by: + Created by (prepend "-" to negate):
- Tag: + Tag (prepend "-" to negate): - -
-
-
-
Examples: diff --git a/scilog/src/app/logbook/core/search-window/search-window.component.ts b/scilog/src/app/logbook/core/search-window/search-window.component.ts index 4e196a86..7a7f243c 100644 --- a/scilog/src/app/logbook/core/search-window/search-window.component.ts +++ b/scilog/src/app/logbook/core/search-window/search-window.component.ts @@ -102,8 +102,8 @@ export class SearchWindowComponent implements OnInit { addToSearch(val: string) { let _stringParts = val.split(" "); _stringParts.forEach((subVal) => { - if (!this.searchString.includes(subVal)) { - this.searchString = subVal + " " + this.searchString; + if (!this.searchString?.includes(subVal)) { + this.searchString = `${subVal} ${this.searchString ?? ''}`; } } );