Just for completeness here is the working version.
import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash(__name__)
app.layout = html.Div([
html.Button('tab1', id='tab1', n_clicks_timestamp=0),
html.Button('tab2', id='tab2', n_clicks_timestamp=0),
html.Button('tab3', id='tab3', n_clicks_timestamp=0),
html.Div(id='content')
])
@app.callback(
dash.dependencies.Output('content','children'),
[dash.dependencies.Input('tab1', 'n_clicks_timestamp' ),
dash.dependencies.Input('tab2', 'n_clicks_timestamp' ),
dash.dependencies.Input('tab3', 'n_clicks_timestamp' )]
)
def on_click(one,two,three):
if one>two and one>three:
return html.H1("This is tab 1")
elif two>one and two>three:
return html.H1("This is tab 2")
elif three>two and three>one:
return html.H1("This is tab 3")
else:
return html.H1("Select a tab")
if __name__ == '__main__':
app.run_server(debug=True)