trouver-une-fresque / trouver-une-fresque-front

Interface utilisateur de l'outil Trouver une Fresque
https://trouverunefresque.org
Other
2 stars 0 forks source link

TypeError: Cannot read properties of null (reading 'removeChild') #25

Open TimotF opened 10 months ago

TimotF commented 10 months ago

Steps to reproduce :

TimotF commented 10 months ago

It looks like a timing issue in the following function :

rafraichirDonneesAffichees() {

        if(this.currentSearch && this.workshopsParDepartement) {
            // const searchTypeConfig = searchTypeConfigFor(this.currentSearch.type);
            const workshopsMatchantCriteres = this.filtrerWorkshopsMatchantLesCriteres(this.workshopsParDepartement, this.currentSearch);
            // const workshopsMatchantCriteres = this.workshopsParDepartement;

            this.workshopsParDepartementAffiches = {
                derniereMiseAJour: this.workshopsParDepartement.derniereMiseAJour,
                codeDepartements: this.workshopsParDepartement.codeDepartements,
                workshopsMatchantCriteres: workshopsMatchantCriteres,
                workshopsDisponibles: workshopsMatchantCriteres,
            };

            this.cartesAffichees = this.infiniteScroll.ajouterCartesPaginees(this.workshopsParDepartementAffiches, []);
        }
    }

this.cartesAfficheesis reactive and will cause the list of workshops to re-render. Needs more investigations