[ADF-5062] Content Node Selector - show inputs based on configuration (#5368)

* toggle search and dropdown list by configuration

* update docs

* tests

* fix inputs setter

* rename
This commit is contained in:
Cilibiu Bogdan
2020-01-15 11:51:57 +02:00
committed by Eugenio Romano
parent 3cf12fca49
commit b931c4a85c
6 changed files with 61 additions and 1 deletions

View File

@@ -54,6 +54,9 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
hasMoreItems: false
});
private showSiteList = true;
private showSearchField = true;
/** Node ID of the folder currently listed. */
@Input()
currentFolderId: string = null;
@@ -136,6 +139,30 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
@Input()
breadcrumbTransform: (node) => any;
/** Toggle search input rendering */
@Input()
set showSearch(value: boolean) {
if (value !== undefined && value !== null) {
this.showSearchField = value;
}
}
get showSearch(): boolean {
return this.showSearchField;
}
/** Toggle sites list dropdown rendering */
@Input()
set showDropdownSiteList(value: boolean) {
if (value !== undefined && value !== null) {
this.showSiteList = value;
}
}
get showDropdownSiteList(): boolean {
return this.showSiteList;
}
/** Emitted when the user has chosen an item. */
@Output()
select: EventEmitter<Node[]> = new EventEmitter<Node[]>();