Hi there, it’s now 5 days since I m trying to understand how the hec can I add a datatable to a dropdown subtab.
This is where I m up to now (obvisouly not working…)
thanks Angelo
app.layout = html.Div(style={'backgroundColor': colors['background']},children=[
html.H1(children='STOCK SCREENER -DASHBOARD',
style={'textAlign': 'left', 'colour': colors['text']}),
dcc.Interval(id='refresh', interval=200,),
dcc.Input(id='input', value='input stock code', type='text', placeholder="stock code"),
dcc.Tabs(id="tabs", value='tab', children=[
dcc.Tab(label='SNAPSHOT', value='tab-1', style=TAB_STYLE,selected_style=SELECTED_STYLE, children=[
html.Div(id='example-graph')]),
dcc.Tab(label='KEY STATS', value='tab-2',style=TAB_STYLE,selected_style=SELECTED_STYLE, children=[
dcc.Dropdown(id='subtab-2', multi=True, options=[{'label': 'Key Stats', 'value': 'A'},
{'label': 'Key Stats Comparison', 'value': 'B'}])]),
dcc.Tab(label='FINANCIALS', value='tab-3',style=TAB_STYLE,selected_style=SELECTED_STYLE,children=[
dcc.Dropdown(id='subtab-3', options=[
{'label': 'Balance Sheet', 'value': 'C'},
dash_table.DataTable( id= 'datatable1', columns=[{"name": i, "id": i} for i in df_balance_sheet],
data=df_balance_sheet.to_dict('records'))],
{'label': 'Income Statement', 'value': 'D'},
{'label': 'Cash Flow', 'value': 'E'}],
)]),