Get Perspective updated object


I created a web app in panel containing a Perspective pane.

table = pn.pane.Perspective(data, columns=columns, expressions=expressions)

The app should work in the following way.

  1. Data are loaded from a database via Python and displayed in Perspective.
  2. The user edits the table (Perspective pane).
  3. Then after clicking a button, that table is postprocessed in Python and then saved to database

Is there a way to access the updated (i.e. edited by the user) table via Python?
table.object still contains original data.

The goal is to access the ‘Current view’ (i.e. the one that you can ‘export’ or ‘copy to clipboard’) or at least the updated object (without the selected columns and expressions).

I am also ok if the output is a raw string containing json data or html code that I will have to parse in Python.

I tried listening to the table with a callback, without success.
The ‘.on_click’ method does not seem to be the right tool.

Thank you! :slight_smile: