search fixes

This commit is contained in:
Denys Vuika
2018-06-12 19:00:34 +01:00
parent 17ceb5e1cf
commit 2320265416
2 changed files with 3 additions and 5 deletions

View File

@@ -11,7 +11,6 @@
<div class="inner-layout__content">
<adf-search
#search
[searchTerm]="searchedWord"
[maxResults]="maxItems"
[skipResults]="skipCount"
(resultLoaded)="onSearchResultLoaded($event)">

View File

@@ -41,7 +41,6 @@ export class SearchComponent implements OnInit {
search: AdfSearchComponent;
queryParamName = 'q';
searchedWord = '';
data: NodePaging;
totalResults = 0;
maxItems = 5;
@@ -68,9 +67,9 @@ export class SearchComponent implements OnInit {
if (this.route) {
this.route.params.forEach((params: Params) => {
this.searchedWord = params.hasOwnProperty(this.queryParamName) ? params[this.queryParamName] : null;
if (this.searchedWord) {
const queryBody = this.searchConfiguration.generateQueryBody(this.searchedWord, 0, 100);
const searchedWord = params.hasOwnProperty(this.queryParamName) ? params[this.queryParamName] : null;
if (searchedWord) {
const queryBody = this.searchConfiguration.generateQueryBody(searchedWord, 0, 100);
this.queryBuilder.userQuery = queryBody.query.query;
this.queryBuilder.update();