AssetPickerDialogComponent
AssetPickerDialogComponent
A dialog which allows the creation and selection of assets.
Example
selectAssets() {
this.modalService
.fromComponent(AssetPickerDialogComponent, {
size: 'xl',
})
.subscribe(result => {
if (result && result.length) {
// ...
}
});
}
Signature
class AssetPickerDialogComponent implements OnInit, AfterViewInit, OnDestroy, Dialog<Asset[]> {
assets$: Observable<AssetLike[]>;
allTags$: Observable<TagFragment[]>;
paginationConfig: PaginationInstance = {
currentPage: 1,
itemsPerPage: 25,
totalItems: 1,
};
multiSelect = true;
initialTags: string[] = [];
resolveWith: (result?: Asset[]) => void;
selection: Asset[] = [];
searchTerm$ = new BehaviorSubject<string | undefined>(undefined);
filterByTags$ = new BehaviorSubject<TagFragment[] | undefined>(undefined);
uploading = false;
constructor(dataService: DataService, notificationService: NotificationService)
ngOnInit() => ;
ngAfterViewInit() => ;
ngOnDestroy() => void;
pageChange(page: number) => ;
itemsPerPageChange(itemsPerPage: number) => ;
cancel() => ;
select() => ;
createAssets(files: File[]) => ;
}
assets$
property
Observable<AssetLike[]>allTags$
property
Observable<TagFragment[]>paginationConfig
property
PaginationInstancemultiSelect
property
initialTags
property
string[]resolveWith
property
(result?: Asset[]) => voidselection
property
Asset[]searchTerm$
property
filterByTags$
property
uploading
property
constructor
method
(dataService: DataService, notificationService: NotificationService) => AssetPickerDialogComponentngOnInit
method
() => ngAfterViewInit
method
() => ngOnDestroy
method
() => voidpageChange
method
(page: number) => itemsPerPageChange
method
(itemsPerPage: number) => cancel
method
() => select
method
() => createAssets
method
(files: File[]) =>