-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
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...
import dash
import json
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
external_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')])
def update_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.0Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
