How to invoke a nanoflow when clicking in a specific tab in tab layout

I have a page with a tab layout. On one of the tabs “Network Diagram” I have a button which executes a nanoflow. I would like this nanoflow be executed automatically when I click this particular tab. How do I achieve it?
1 answers

Possibly there are better options than this, but this is an option without creating too much custom stuff, though it feels a bit awkward.

For the tab, set “refresh on show” to yes.

In the tab, add a data view with a nanoflow as datasource.

The nanoflow will get triggered each time you start the tab.