Get a feedback on changed values in table via experimental data editor

Hello guys,
Jutst started to use the editible dataframe feature in my app, one feature I build is the ability to change/add existing annotations of an image. I use a table that presents data of existing annotations (label and bbox values). The user can change values of existing annotations or insert a new row and add more annotations. My question is: is there some kind of flag I can use to get back only the values that had changed? or should I use the old fashioned way: saving the original table and compare it to the edited table row by row?


That is explained in the documentation:

If a key parameter is set, Streamlit will store any changes made to the dataframe in the session state.

I did not see it in the documentation, but I did see the “on_change”, I never used that option - is anyone used it and can bring light to this issue?

key (str) An optional string to use as the unique key for this widget. If this is omitted, a key will be generated for the widget based on its content. Multiple widgets of the same type may not share the same key.
on_change (callable) An optional callback invoked when this data_editor’s value changes.

It is right there in the link I posted. There is even a code example. You don’t need an on_change callback to access the edited data.