Fix click on feature
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -6,6 +6,7 @@ import {IQueryState } from '@farmmaps/common';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
import * as mapActions from '../../actions/map.actions';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -21,6 +22,7 @@ export class FeatureListContainerComponent {
|
||||
@Input() features: Array<Feature>
|
||||
@Input() queryState: IQueryState;
|
||||
@Input() selectedFeature: Feature;
|
||||
@Input() clickedFeature:Observable<Feature>;
|
||||
|
||||
@ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
|
||||
componentRef:any;
|
||||
@@ -52,6 +54,12 @@ export class FeatureListContainerComponent {
|
||||
(<AbstractFeatureListComponent>this.componentRef.instance).selectedFeature = this.selectedFeature;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.clickedFeature.subscribe((feature => {
|
||||
(<AbstractFeatureListComponent>this.componentRef.instance).handleFeatureClick(feature);
|
||||
}));
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if ((changes["features"] && changes["features"].currentValue)) {
|
||||
if (this.queryState) {
|
||||
|
Reference in New Issue
Block a user