How to have callback fire only once two inputs BOTH change

Hello,

In my application I have four components:

  • data_uploader
  • my_data_store
  • calculate_button
  • my_table

The calculation step is expensive, so I don’t want to automatically “recalculate” when new data is uploaded. I only want to recalculate after new data is uploaded AND the user clicks the calculate button. I also don’t want to recalculate if the user presses calculate, but the data hasn’t changed.

Does anyone know how to have the callback only fire once BOTH these inputs change?

I can put together a working example if this is ambiguous.

Thank you