# lets user update data themselves
# loading button
dbc.Spinner(children=[html.Button('Update', id='interval-component',style = {'marginLeft':'10px'}),
html.Div(id='page-1-content')
], color = 'rgb(0,128,0)'),
])
# callback takes in 4 input variables including one to refresh every 15 seconds
@callback(
Output('page-1-content','children'),
[
State('dropvalue','value'),
State('datevalue','value'),
State('notional','value'),
Input('interval-component', 'n_clicks')
])
# datatable is using the dataframe from the query
def update_output(dropval,dateval,notional,n):
This is my code. I must have the Datatable being generated in the callback as the user gets to define the dataframe with a SQL pull based on input parameters. As of now my dbc.Spinner is a loading button that replaces any data on the screen until newer data is generated. I want to keep the old data with the loading button, if possible.