Here is what I have, I think that I have a miss concept problem:
These callbacks are getting fired at the start-up correct.
I want that everything starts disabled except for the user inputs once the user inputs the data and clicks submit, the submit option should be disabled and the other callbacks should wait for this callback to end.
@dash.callback(
output=[Output('base-df', 'data'), # Output that updates the dcc.store component with the data that I pull from the db
Output('lt_in', 'children'), # Output that just show the values that the user inputs for the query
Output('oper_in', 'children')],# Output that just show the values that the user inputs for the query
inputs=[Input('SubmitB', 'n_clicks'), # Submit Button
State('lots-input', 'value'), # Query value
State('oper-input', 'value')], # Query value
background=True,
running=[
#Dcc Store that stores Data From DB
(Output("base-df", "disabled"),True, False),
#Dcc Store that stores Cleaned Data ** The callback that cleans this is being fired
(Output("base-df-2", "disabled"),True, False),
# Submit Botom
(Output("SubmitB", "disabled"), True, False),
#Dcc Store that stores filtered Data based on user dd menus selection ** The callback that filtered this is being fired
(Output("filtered-df", "disabled"), True, False),
#DD Menu
(Output("p-picker", "disabled"), True, False),
#DD Menu
(Output("oper-picker", "disabled"), True, False),
#DD Menu
(Output("d-picker", "disabled"), True, False),
#DD Menu
(Output("m-picker", "disabled"), True, False),
#DD Menu
(Output("graph", "disabled"), True, False),
],
prevent_initial_call=True
)
def run_query(n_clicks, lots, oper):
#This is fired once I click submit, so here is my problem I want that everything starts in a disabled mode except for the user inputs. Once the user enters the inputs and click submit this callback needs to start running and the other callbacks should be disabled
if n_clicks>0:
df_hbase=us.getquerydata(lt,oper,'Queries/querietest.sql')
base_json=df_hbase.to_json(date_format='iso', orient='split')
return base_json, lots, oper
else:
raise PreventUpdate