55693: (incomplete) store interraction for selecting items

This commit is contained in:
Kristof De Langhe
2018-09-26 17:30:24 +02:00
parent 9440401ca3
commit 5040d230fb
7 changed files with 279 additions and 5 deletions

View File

@@ -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);
}
}