mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3435][ADF-3436] fix search chips (#3681)
* fix chip list remove * fix tests * better find criteria * swap to fix e2e test * set 'expanded' for facetFields from config * fix e2e test * remove comments
This commit is contained in:
committed by
Eugenio Romano
parent
c328d70e43
commit
6f313b7c37
@@ -106,6 +106,10 @@ export class SearchQueryBuilderService {
|
||||
}
|
||||
}
|
||||
|
||||
getUserFacetBuckets(field: string) {
|
||||
return this.userFacetBuckets[field] || [];
|
||||
}
|
||||
|
||||
removeUserFacetBucket(field: FacetField, bucket: FacetFieldBucket) {
|
||||
if (field && field.field && bucket) {
|
||||
const buckets = this.userFacetBuckets[field.field] || [];
|
||||
@@ -142,7 +146,7 @@ export class SearchQueryBuilderService {
|
||||
|
||||
getFacetField(label: string): FacetField {
|
||||
if (label) {
|
||||
const fields = this.config.facetFields || [];
|
||||
const fields = this.config.facetFields.fields || [];
|
||||
const result = fields.find(field => field.label === label);
|
||||
if (result) {
|
||||
return { ...result };
|
||||
@@ -286,7 +290,7 @@ export class SearchQueryBuilderService {
|
||||
}
|
||||
|
||||
protected get facetFields(): RequestFacetFields {
|
||||
const facetFields = this.config.facetFields;
|
||||
const facetFields = this.config.facetFields && this.config.facetFields.fields;
|
||||
|
||||
if (facetFields && facetFields.length > 0) {
|
||||
return {
|
||||
|
Reference in New Issue
Block a user