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[]) => ;
}
Implements
Members
assets$
property
type:
Observable<AssetLike[]>
allTags$
property
type:
Observable<TagFragment[]>
paginationConfig
property
type:
PaginationInstance
multiSelect
property
type:
initialTags
property
type:
string[]
resolveWith
property
type:
(result?: Asset[]) => void
selection
property
type:
Asset[]
searchTerm$
property
type:
filterByTags$
property
type:
uploading
property
type:
constructor
method
type:
(dataService: DataService, notificationService: NotificationService) => AssetPickerDialogComponent
ngOnInit
method
type:
() =>
ngAfterViewInit
method
type:
() =>
ngOnDestroy
method
type:
() => void
pageChange
method
type:
(page: number) =>
itemsPerPageChange
method
type:
(itemsPerPage: number) =>
cancel
method
type:
() =>
select
method
type:
() =>
createAssets
method
type:
(files: File[]) =>