curves_grid = dash.Dash(__name__, external_stylesheets=[dbc.themes.LITERA])
# Define the layout of the app
gbp_curves_grid.layout = html.Div([
dag.AgGrid(
id='curves_grid',
columnDefs=[
{'field': 'A', 'editable': False},
{'field': 'B', 'editable': True},
{'field': 'C', 'editable': False, "cellRenderer": "agAnimateShowChangeCellRenderer"},
{'field': 'D', 'editable': False},
],
rowData=df_curves.to_dict("records"),
enableEnterpriseModules=True,
getRowId="params.data.id",
),
])
@curves_grid.callback(Output('curves_grid', 'rowTransaction'),
Input('curves_grid', 'cellValueChanged'),
prevent_initial_call=True,)
def update_close(row_changed):
if row_changed: row_changed[0]['data']['D'] = 40
return {"update": row_changed}