mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
55693: Item mapper page + ItemSelectComponent
This commit is contained in:
28
src/app/shared/item-select/item-select.component.ts
Normal file
28
src/app/shared/item-select/item-select.component.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { ItemDataService } from '../../core/data/item-data.service';
|
||||
import { PaginatedList } from '../../core/data/paginated-list';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Item } from '../../core/shared/item.model';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-item-select',
|
||||
styleUrls: ['./item-select.component.scss'],
|
||||
templateUrl: './item-select.component.html'
|
||||
})
|
||||
|
||||
export class ItemSelectComponent implements OnInit {
|
||||
|
||||
@Input()
|
||||
items$: Observable<RemoteData<PaginatedList<Item>>>;
|
||||
|
||||
checked: boolean[] = [];
|
||||
|
||||
constructor(private itemDataService: ItemDataService) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.items$ = this.itemDataService.findAll({});
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user