# dcc.Input changes output but can it not?

**URL:** <https://community.plotly.com/t/dcc-input-changes-output-but-can-it-not/72956>\
**Category:** Dash Python\
**Created:** [February 22, 2023, 8:29pm UTC](https://community.plotly.com/t/dcc-input-changes-output-but-can-it-not/72956 "2023-02-22T20:29:50Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![dgudhka](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@dgudhka](https://community.plotly.com/u/dgudhka)\
**Post date:** [February 27, 2023, 4:22pm UTC](https://community.plotly.com/t/dcc-input-changes-output-but-can-it-not/72956/9 "2023-02-27T16:22:23Z")

</div>

```auto
    # 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.

---

_[View the full topic](https://community.plotly.com/t/dcc-input-changes-output-but-can-it-not/72956)._
