How to attach call back to a dynamically generated NavLink

Hi team,

I am trying to create a Tree-like structure for a GCS bucket using NavLink from “dash-mantine-components”.
It was successful and I am able to see the structure in the browser.

Now I need to load the file in the application as soon as it gets selected from the UI.

I am trying to follow an approach where I can attach a callback with those dynamically generated NavLinks
so as soon as the NavLink is clicked the callback gets triggered, but I don’t know how to get it done.

any suggestions??