✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Callback when row is deleted in a data table

Hi,

Is it possible to generate a callback when a row is deleted, with the input of which row was deleted?

Hi keend,
Comparing ‘data’ and ‘data_previous’ States of your DataTable, you should be able to find the difference

@app.callback(
    Output(...),
    [Input('your-table', 'data_timestamp')],
    [State('your-table', 'data'), State('your-table', 'data_previous')] 
)

Thank you @March,

This will trigger a callback on any changes to the data table I guess? I would like a callback that is only triggered by a deletion, instead of having to figure out what changed in the data table at the given moment.

This feature would be really useful!