cr changes
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Thu, 11 Oct 2018 14:04:20 +0000 (16:04 +0200)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Thu, 11 Oct 2018 14:04:20 +0000 (16:04 +0200)
Feature #14308

Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

src/services/search-service/search-service.ts
src/views-components/search-bar/search-bar-view.tsx

index 8a218bd5db0ac38bc44fecafeaf79cae3347c21d..f9392c237a1c46387f49891201e493ca9490cbb3 100644 (file)
@@ -7,7 +7,7 @@ export class SearchService {
     private savedQueries: string[] = this.getSavedQueries();
 
     saveRecentQuery(query: string) {
-        if (this.recentQueries.length >= 5) {
+        if (this.recentQueries.length >= MAX_NUMBER_OF_RECENT_QUERIES) {
             this.recentQueries.shift();
             this.recentQueries.push(query);
         } else {
@@ -33,4 +33,6 @@ export class SearchService {
         this.savedQueries.splice(id, 1);
         localStorage.setItem('savedQueries', JSON.stringify(this.savedQueries));
     }
-}
\ No newline at end of file
+}
+
+const MAX_NUMBER_OF_RECENT_QUERIES = 5;
\ No newline at end of file
index 8abd2aa0d3be2ecd0b627d4a8afffa3682a092bd..59fe4104fca3601845d4a89636a8377a173748ec 100644 (file)
@@ -44,7 +44,7 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => {
         view: {
             position: 'absolute',
             width: '100%',
-            zIndex: 1001
+            zIndex: 1
         }
     };
 };