Sortable table with link/button to details or modal box

I’m trying to find a solution for displaying a table (let’s say servers or network devices) where I can sort by hostname, IP, location, country etc.

But the main feature would be to have in the last column some sort of link or button that either opens a modal box with additional info of that entry or display a container under the selected row/button/link.

Been looking for a working example but can’t seem to find any. Is such thing even achievable? I know that tables don’t really work well with interactive elements but maybe there’s someone smarter than me and had such requirement?

You can detect row selections in st.dataframe. Not using buttons but check boxes, and not in the last column but in the first one, but you would have equivalent functionality.