mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
55693: (incomplete) store interraction for selecting items
This commit is contained in:
@@ -5,6 +5,7 @@ import { RemoteData } from '../../core/data/remote-data';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Item } from '../../core/shared/item.model';
|
||||
import { PaginationComponentOptions } from '../pagination/pagination-component-options.model';
|
||||
import { ItemSelectService } from './item-select.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-item-select',
|
||||
@@ -22,11 +23,19 @@ export class ItemSelectComponent implements OnInit {
|
||||
|
||||
checked: boolean[] = [];
|
||||
|
||||
constructor(private itemDataService: ItemDataService) {
|
||||
constructor(private itemSelectService: ItemSelectService) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.itemsRD$.subscribe((value) => console.log(value));
|
||||
}
|
||||
|
||||
switch(id: string) {
|
||||
this.itemSelectService.switch(id);
|
||||
}
|
||||
|
||||
getSelected(id: string): Observable<boolean> {
|
||||
return this.itemSelectService.getSelected(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user