Dash DataTable Callback Input and Output sharing same ID

Need to use the same Dash DataTable for Input and Output within the app callback scheme.

I am aware that it is not supported yet.

Short description of the app: It is a task list Data Table populated from a MongoDB collection. In the process the app captures all user updates made, and once a push-button is pressed those changes are stored back to the MongoDB collection.

Once the update occurred I would have liked to present the updated information back in the same Data Table. A page Refresh renders the old data, meaning I have to stop and start the docker container’s app on a regular basis

Could anyone recommend a workaround?

Hi,

Could you share a code snippet of what you have tried so far? There are multiple ways to do what you described.

Now, based on your first two sentences: if you just want to send the data prop from the table to your DB when the button is pushed and then fetch back some data, it might be enough to pass it as State instead of Input (the button should trigger the callback, not updates to data).

The sample code I used was taken from: Detecting changed cell in Editable Datatable

As mentioned, the data is coming from MongoDB which is updated at every pushbutton. I wanted the refreshed data from the database rendered back in id=“table-data-diff” from the capture_diffs callback function