coronasafe / dashboard

A data visualisation dashboard with capacity map, plots and charts
https://dashboard.coronasafe.network/
MIT License
13 stars 24 forks source link

Fix filter button double click bug. Issue #136 #163

Closed ghost closed 3 years ago

ghost commented 3 years ago

Co-authored-by: @ProCode2

Issue : #136

Reason behind bug

After clicking facility type filter button when filter dropdown show is enabled, two event handler(onClick of filter button and onClose of dropdown) called at the same time. The two event handler on here1 and here2 This results in unpredictable random execution. When console logged, it executes onClose handler 50-100 times after second click to facility filter button and finally stops.

Solution applied

Made filter type button disabled when facilityTypeFilterOpen (show dropdown boolean) is true in line No other solution i could find 😅 , hence other suggestions are welcomed

Proposed Changes

dec81f4d-7e5d-4fe3-8dd9-b79d98fbf6f6

closes #136