Skip to content

Commit

Permalink
Fix frontend/synthese-advanced: dynamic tree now avalaible in ngOnInit
Browse files Browse the repository at this point in the history
  • Loading branch information
jpm-cbna committed Feb 24, 2022
1 parent 71b1eaf commit 0455dfb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { TaxonAdvancedStoreService } from '@geonature_common/form/synthese-form/
styleUrls: ['./synthese-advanced-form.component.scss']
})
export class TaxonAdvancedModalComponent implements OnInit, AfterContentInit {
@ViewChild('tree', { static: false })
@ViewChild('tree', { static: true })
public treeComponent: TreeComponent;
public URL_AUTOCOMPLETE;
public taxonsTree;
Expand Down Expand Up @@ -59,7 +59,7 @@ export class TaxonAdvancedModalComponent implements OnInit, AfterContentInit {

ngOnInit() {
// if the modal has already been open, reload the former state of the taxon tree
if (this.storeService.taxonTreeState) {
if (this.storeService.displayTaxonTree && this.storeService.taxonTreeState) {
this.storeService.treeModel.setState(this.storeService.taxonTreeState);
}
}
Expand Down

0 comments on commit 0455dfb

Please sign in to comment.