Skip to content

Instantly share code, notes, and snippets.

@dcbark01
Last active April 25, 2018 18:07
Show Gist options
  • Save dcbark01/db7c3e1376aa0885f5aca3235a6db5ac to your computer and use it in GitHub Desktop.
Save dcbark01/db7c3e1376aa0885f5aca3235a6db5ac to your computer and use it in GitHub Desktop.
# Create our app layout
app = dash.Dash(__name__)
server = app.server
app.layout = html.Div([
html.H2('My Dash App'),
dt.DataTable(
id='my-datatable',
rows=df_ag.to_dict('records'),
editable=False,
row_selectable=True,
filterable=True,
sortable=True,
selected_row_indices=[]
),
html.Div(id='selected-indexes'),
dcc.Graph(
id='datatable-subplots'
),
# +++++++++ START UPDATED APP LAYOUT FOR QUERY BUTTON ++++++++++
html.Div(id='container-query-button', children=[
html.Button('Run Query', id='button-query', disabled=True),
]),
dcc.Textarea(
id=textbox-population,
placeholder='Select a single row to query in the datatable',
value=None,
style={'width': '40%'}
)
# +++++++++ END UPDATED APP LAYOUT FOR QUERY BUTTON ++++++++++
], style={'width': '60%'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment