From f33e625973c6855aa7a06e567cbd923855da97b4 Mon Sep 17 00:00:00 2001 From: Elliott Rose Date: Wed, 7 Dec 2022 12:10:05 +0100 Subject: [PATCH] Fix issue with Eval/Visual Comparison popups not being accessible on second consecutive click. --- tabs/evaluation_callbacks.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tabs/evaluation_callbacks.py b/tabs/evaluation_callbacks.py index 7678f01..9a892e6 100644 --- a/tabs/evaluation_callbacks.py +++ b/tabs/evaluation_callbacks.py @@ -494,7 +494,8 @@ def register_callbacks(app, cache, cache_timeout): @app.callback( [#Output('alert-eval-popup', 'is_open'), Output('stations-clicked-coords', 'data'), - Output(dict(tag='empty-map', index='None'), 'children')], + Output(dict(tag='empty-map', index='None'), 'children'), + Output(dict(tag='empty-map', index='None'), 'click_lat_lng')], [Input(dict(tag='empty-map', index='None'), 'click_lat_lng')], [State(dict(tag='empty-map', index='None'), 'children'), State('stations-dataframe', 'data')], @@ -574,7 +575,9 @@ def register_callbacks(app, cache, cache_timeout): if DEBUG: print("********", type(log), log.keys()) # print(log['type']) - return curr_data, mapid + #Clear the click_data so that repeat clicks continue to call the callback + click_data = None + return curr_data, mapid, click_data @app.callback( -- GitLab