Make templating more responsive
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:
@@ -49,9 +49,9 @@ export class FeatureListContainerComponent {
|
||||
viewContainerRef.clear();
|
||||
|
||||
this.componentRef = viewContainerRef.createComponent(componentFactory);
|
||||
(<AbstractFeatureListComponent>this.componentRef.instance).features = this.features;
|
||||
(<AbstractFeatureListComponent>this.componentRef.instance).queryState = this.queryState;
|
||||
(<AbstractFeatureListComponent>this.componentRef.instance).selectedFeature = this.selectedFeature;
|
||||
(<AbstractFeatureListComponent>this.componentRef.instance).features = null;
|
||||
(<AbstractFeatureListComponent>this.componentRef.instance).queryState = queryState;
|
||||
(<AbstractFeatureListComponent>this.componentRef.instance).selectedFeature = null;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -61,10 +61,11 @@ export class FeatureListContainerComponent {
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if ((changes["queryState"] && changes["queryState"].currentValue)) {
|
||||
this.loadComponent(changes["queryState"].currentValue);
|
||||
}
|
||||
if ((changes["features"] && changes["features"].currentValue)) {
|
||||
if (this.queryState) {
|
||||
this.loadComponent(this.queryState);
|
||||
}
|
||||
(<AbstractFeatureListComponent>this.componentRef.instance).features = changes["features"].currentValue;
|
||||
}
|
||||
if(changes["selectedFeature"]) {
|
||||
(<AbstractFeatureListComponent>this.componentRef.instance).selectedFeature = changes["selectedFeature"].currentValue;
|
||||
|
Reference in New Issue
Block a user