In the following example, the value of the input textbox in the browser page does get updated by the callback update_a_value. I would expect, that the value is set to 'Set by callback' after the page loaded. The http requests are made correctly as shown in the image, but the new value is not rendered...
importdashimportjsonimportdash_core_componentsasdccimportdash_html_componentsashtmlfromdash.dependenciesimportInput, Output, Stateexternal_stylesheets= ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app=dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout=html.Div([
dcc.Input(id='a', type='text', value='Initial value'),
html.Button('Hello', id='button-1')
])
@app.callback(Output('a', 'value'), [Input('button-1', 'n_clicks')])defupdate_a_value(unused_clicks):
return'Set by callback'app.run_server(host='0.0.0.0', port=8080, debug=False)
Versions:
dash-core-components==0.44.0
dash-html-components==0.14.0
dash-renderer==0.20.0
dash==0.39.0
In the following example, the value of the input textbox in the browser page does get updated by the callback update_a_value. I would expect, that the value is set to
'Set by callback'after the page loaded. The http requests are made correctly as shown in the image, but the new value is not rendered...Versions: