mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2242] Search on custom sources is not working. (#2904)
* [ADF-2242] Search on custom sources is not working. fix search on custom sources * [ADF-2242] added unit tests * [ADF-2242] reverted change * [ADF-2242] simplify code on search method and make extra call only when having custom dropdown defined
This commit is contained in:
committed by
Eugenio Romano
parent
5ee9b09a21
commit
78c6a68e51
@@ -220,8 +220,19 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
|
||||
private querySearch(): void {
|
||||
this.loadingSearchResults = true;
|
||||
|
||||
this.contentNodeSelectorService.search(this.searchTerm, this.siteId, this.skipCount, this.pageSize)
|
||||
.subscribe(this.showSearchResults.bind(this));
|
||||
if (this.dropdownSiteList) {
|
||||
this.documentList.getCorrespondingNodeIds(this.siteId)
|
||||
.then(nodeIds => {
|
||||
this.contentNodeSelectorService.search(this.searchTerm, this.siteId, this.skipCount, this.pageSize, nodeIds)
|
||||
.subscribe(this.showSearchResults.bind(this));
|
||||
})
|
||||
.catch(() => {
|
||||
this.showSearchResults({list: {entries: []}});
|
||||
});
|
||||
} else {
|
||||
this.contentNodeSelectorService.search(this.searchTerm, this.siteId, this.skipCount, this.pageSize)
|
||||
.subscribe(this.showSearchResults.bind(this));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user