mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
[AAE-2202] Not able to search for files (#5569)
* [AAE-2202] Not able to search for files * * fixd test * * fixed panel test * * fixed files search options * * added docs
This commit is contained in:
@@ -56,6 +56,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
|
||||
|
||||
private showSiteList = true;
|
||||
private showSearchField = true;
|
||||
private showFiles = false;
|
||||
|
||||
/** Node ID of the folder currently listed. */
|
||||
@Input()
|
||||
@@ -163,6 +164,14 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
|
||||
return this.showSiteList;
|
||||
}
|
||||
|
||||
/** Shows the files and folders in the search result */
|
||||
@Input()
|
||||
set showFilesInResult(value: boolean) {
|
||||
if (value !== undefined && value !== null) {
|
||||
this.showFiles = value;
|
||||
}
|
||||
}
|
||||
|
||||
/** Emitted when the user has chosen an item. */
|
||||
@Output()
|
||||
select: EventEmitter<Node[]> = new EventEmitter<Node[]>();
|
||||
@@ -355,14 +364,14 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
|
||||
if (this.customResourcesService.hasCorrespondingNodeIds(this.siteId)) {
|
||||
this.customResourcesService.getCorrespondingNodeIds(this.siteId)
|
||||
.subscribe((nodeIds) => {
|
||||
this.contentNodeSelectorService.search(this.searchTerm, this.siteId, this.pagination.skipCount, this.pagination.maxItems, nodeIds)
|
||||
this.contentNodeSelectorService.search(this.searchTerm, this.siteId, this.pagination.skipCount, this.pagination.maxItems, nodeIds, this.showFiles)
|
||||
.subscribe(this.showSearchResults.bind(this));
|
||||
},
|
||||
() => {
|
||||
this.showSearchResults({ list: { entries: [] } });
|
||||
});
|
||||
} else {
|
||||
this.contentNodeSelectorService.search(this.searchTerm, this.siteId, this.pagination.skipCount, this.pagination.maxItems)
|
||||
this.contentNodeSelectorService.search(this.searchTerm, this.siteId, this.pagination.skipCount, this.pagination.maxItems, [], this.showFiles)
|
||||
.subscribe(this.showSearchResults.bind(this));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user