| ... |
... |
@@ -65,16 +65,18 @@ |
| 65 |
65 |
this.nb = e.target.value; |
| 66 |
66 |
} |
| 67 |
67 |
handleSearch(textSearch) { |
|
68 |
+ console.log(textSearch); |
| 68 |
68 |
if(this.searchText !== "" || textSearch) { |
| 69 |
69 |
// if(this.searchText !== this.prevSearchText) { |
| 70 |
70 |
this.clearResults(); |
| 71 |
71 |
this.prevSearchText = this.searchText; |
| 72 |
72 |
this.fetchWikiSearch().then(results => { |
| 73 |
|
- this.resultsCache = results; |
|
74 |
+ console.log('results', results); |
|
75 |
+ //this.resultsCache = results; |
| 74 |
74 |
if(this.hasActiveFilters()) { |
| 75 |
75 |
this.fetchFilterSearch().then(this.filterResults); |
| 76 |
76 |
} else { |
| 77 |
|
- this.results = results; |
|
79 |
+ this.results = results ? results : []; |
| 78 |
78 |
} |
| 79 |
79 |
}) |
| 80 |
80 |
/*} else if (this.searchText === this.prevSearchText && this.hasActiveFilters()) { |