mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3108] Search - facetQueries panel renders when not defined in configuration (#3417)
* show facetQueries based on configuration definition * tests * FacetQueries is defined
This commit is contained in:
committed by
Denys Vuika
parent
3f332997c6
commit
2f12f518ef
@@ -159,6 +159,19 @@ export class SearchQueryBuilderService {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if FacetQueries has been defined
|
||||
*/
|
||||
get hasFacetQueries(): boolean {
|
||||
if (this.config
|
||||
&& this.config.facetQueries
|
||||
&& this.config.facetQueries.queries
|
||||
&& this.config.facetQueries.queries.length > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private get sort(): RequestSortDefinitionInner[] {
|
||||
return this.sorting.map(def => {
|
||||
return {
|
||||
@@ -217,14 +230,4 @@ export class SearchQueryBuilderService {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private get hasFacetQueries(): boolean {
|
||||
if (this.config
|
||||
&& this.config.facetQueries
|
||||
&& this.config.facetQueries.queries
|
||||
&& this.config.facetQueries.queries.length > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user