title: "AssetPickerDialogComponent" isDefaultIndex: false
import MemberInfo from '@site/src/components/MemberInfo'; import GenerationInfo from '@site/src/components/GenerationInfo'; import MemberDescription from '@site/src/components/MemberDescription';
A dialog which allows the creation and selection of assets.
Example
selectAssets() {
this.modalService
.fromComponent(AssetPickerDialogComponent, {
size: 'xl',
})
.subscribe(result => {
if (result && result.length) {
// ...
}
});
}
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[]) => ;
}