mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1769] Added JSDocs and prop tables (#2898)
This commit is contained in:
committed by
Eugenio Romano
parent
0d93c65fd7
commit
dd7afc65db
@@ -26,15 +26,25 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
})
|
||||
export class DropdownSitesComponent implements OnInit {
|
||||
|
||||
/** Hide the "My Files" option. */
|
||||
@Input()
|
||||
hideMyFiles: boolean = false;
|
||||
|
||||
/** A custom list of sites to be displayed by the dropdown. If no value
|
||||
* is given, the sites of the current user are displayed by default. A
|
||||
* list of objects only with properties 'title' and 'guid' is enough to
|
||||
* be able to display the dropdown.
|
||||
*/
|
||||
@Input()
|
||||
siteList: SitePaging = null;
|
||||
|
||||
/** Text or a translation key to act as a placeholder. */
|
||||
@Input()
|
||||
placeholder: string = 'DROPDOWN.PLACEHOLDER_LABEL';
|
||||
|
||||
/** Emitted when the user selects a site. When the default option is selected,
|
||||
* an empty model is emitted.
|
||||
*/
|
||||
@Output()
|
||||
change: EventEmitter<SiteEntry> = new EventEmitter();
|
||||
|
||||
@@ -54,7 +64,7 @@ export class DropdownSitesComponent implements OnInit {
|
||||
let siteFound;
|
||||
if (this.siteSelected === this.MY_FILES_VALUE) {
|
||||
siteFound = { entry: {}};
|
||||
}else {
|
||||
} else {
|
||||
siteFound = this.siteList.list.entries.find( site => site.entry.guid === this.siteSelected);
|
||||
}
|
||||
this.change.emit(siteFound);
|
||||
|
Reference in New Issue
Block a user