Skip to content
Snippets Groups Projects
Commit 66f9f937 authored by Alexis POYEN's avatar Alexis POYEN
Browse files

Fix : bug when getting electeds with two eventlistener on filter

parent dbc0cfcd
No related branches found
No related tags found
1 merge request!76Resolve "Detaileds results title"
Pipeline #6630 passed
......@@ -120,6 +120,7 @@ class ResultZoneComponent {
for (var i = 0; i < radioButtons.length; i++) {
radioButtons[i].addEventListener("click", async (e) => {
await this.parent.calculateResults();
this.parent.resultsGeneral.displayRoundResults();
if (this.areaDisplayed !== undefined) {
this.areaDisplayed = resultHandler.parent.results.areasResults.find(
(areaFind) => areaFind.ID == this.areaDisplayed.ID
......
......@@ -112,15 +112,6 @@ class ResultComponent {
document.getElementById("sections").setAttribute("class", "is-active");
});
let radioButtons = document.getElementsByName("filter");
for (var i = 0; i < radioButtons.length; i++) {
radioButtons[i].addEventListener("click", async (e) => {
await this.calculateResults();
this.resultsZone.displayResults();
this.resultsGeneral.displayRoundResults();
});
}
window.intervalRefreshResults = setInterval(async () => {
this.calculateResults();
this.resultsZone.displayResults();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment