1414import plotly .graph_objects as go
1515from config import GM_FILTER_DROPDOWN_BGC_CLASS_OPTIONS
1616from config import GM_FILTER_DROPDOWN_MENU_OPTIONS
17+ from config import GM_RESULTS_TABLE_CHECKL_OPTIONAL_COLUMNS
1718from config import GM_RESULTS_TABLE_MANDATORY_COLUMNS
1819from config import GM_RESULTS_TABLE_OPTIONAL_COLUMNS
1920from config import MG_FILTER_DROPDOWN_MENU_OPTIONS
21+ from config import MG_RESULTS_TABLE_CHECKL_OPTIONAL_COLUMNS
2022from config import MG_RESULTS_TABLE_MANDATORY_COLUMNS
2123from config import MG_RESULTS_TABLE_OPTIONAL_COLUMNS
2224from config import SCORING_DROPDOWN_MENU_OPTIONS
@@ -249,6 +251,11 @@ def process_mg_link(mf, gcf, methods_data):
249251 Output ("gm-scoring-blocks-id" , "data" , allow_duplicate = True ),
250252 Output ("gm-scoring-blocks-container" , "children" , allow_duplicate = True ),
251253 Output ("gm-results-button" , "disabled" ),
254+ Output ("gm-table" , "selected_rows" , allow_duplicate = True ),
255+ Output ("gm-table-select-all-checkbox" , "value" , allow_duplicate = True ),
256+ Output ("gm-filter-accordion-component" , "value" , allow_duplicate = True ),
257+ Output ("gm-scoring-accordion-component" , "value" , allow_duplicate = True ),
258+ Output ("gm-results-table-column-toggle" , "value" , allow_duplicate = True ),
252259 # MG tab outputs
253260 Output ("mg-tab" , "disabled" ),
254261 Output ("mg-filter-accordion-control" , "disabled" ),
@@ -260,6 +267,11 @@ def process_mg_link(mf, gcf, methods_data):
260267 Output ("mg-scoring-blocks-id" , "data" , allow_duplicate = True ),
261268 Output ("mg-scoring-blocks-container" , "children" , allow_duplicate = True ),
262269 Output ("mg-results-button" , "disabled" ),
270+ Output ("mg-table" , "selected_rows" , allow_duplicate = True ),
271+ Output ("mg-table-select-all-checkbox" , "value" , allow_duplicate = True ),
272+ Output ("mg-filter-accordion-component" , "value" , allow_duplicate = True ),
273+ Output ("mg-scoring-accordion-component" , "value" , allow_duplicate = True ),
274+ Output ("mg-results-table-column-toggle" , "value" , allow_duplicate = True ),
263275 ],
264276 [Input ("file-store" , "data" )],
265277 prevent_initial_call = True ,
@@ -275,6 +287,16 @@ def disable_tabs_and_reset_blocks(
275287 Returns:
276288 Tuple containing boolean values for disabling tabs, styles, and new block data.
277289 """
290+ default_gm_column_value = (
291+ [GM_RESULTS_TABLE_CHECKL_OPTIONAL_COLUMNS [0 ]]
292+ if GM_RESULTS_TABLE_CHECKL_OPTIONAL_COLUMNS
293+ else []
294+ )
295+ default_mg_column_value = (
296+ [MG_RESULTS_TABLE_CHECKL_OPTIONAL_COLUMNS [0 ]]
297+ if MG_RESULTS_TABLE_CHECKL_OPTIONAL_COLUMNS
298+ else []
299+ )
278300 if file_path is None :
279301 # Disable all tabs and controls when no file is uploaded
280302 return (
@@ -289,6 +311,11 @@ def disable_tabs_and_reset_blocks(
289311 [],
290312 [],
291313 True ,
314+ [],
315+ [],
316+ [],
317+ [],
318+ default_gm_column_value ,
292319 # MG tab - disabled
293320 True ,
294321 True ,
@@ -300,6 +327,11 @@ def disable_tabs_and_reset_blocks(
300327 [],
301328 [],
302329 True ,
330+ [],
331+ [],
332+ [],
333+ [],
334+ default_mg_column_value ,
303335 )
304336
305337 # Enable the tabs and reset blocks
@@ -327,6 +359,11 @@ def disable_tabs_and_reset_blocks(
327359 gm_scoring_initial_block_id ,
328360 gm_scoring_new_blocks ,
329361 False ,
362+ [],
363+ [],
364+ [],
365+ [],
366+ default_gm_column_value ,
330367 # MG tab - enabled with initial blocks
331368 False ,
332369 False ,
@@ -338,6 +375,11 @@ def disable_tabs_and_reset_blocks(
338375 mg_scoring_initial_block_id ,
339376 mg_scoring_new_blocks ,
340377 False ,
378+ [],
379+ [],
380+ [],
381+ [],
382+ default_mg_column_value ,
341383 )
342384
343385
0 commit comments