Closed sylvoslee closed 5 years ago
your html.Div('output') has no id the correct code as following
app.config['suppress_callback_exceptions'] = True
app.layout=html.Div([
html.Button('output',id='output-btn'),
html.Div(id = 'output')
])
app.config['suppress_callback_exceptions']=True
@app.callback(
Output('output', 'children'),
[Input('output-btn', 'n_clicks')])
def update_wordcloud(n_clicks):
if n_clicks is None:
raise PreventUpdate
return visdcc.DataTable(id = 'table2',
box_type = 'radio',
data = DF_SAMPLE,
scroll = {'y':200},
pagination = {'pageSize': 5},
style = {'width':'100%'})
If I use the callback to display the table, I need to click the button multiple times to activate the sorting and selection function. Can you help solve this problem?
https://community.plot.ly/t/share-visdcc-datatable-a-dash-component-for-antd-table/8227