Make `LinkColumn` urls open in same tab?

Hi, I am using st.column_config.LinkColumn to link to another page of my app (with varying query parameters). Is there a way for the page to open in the same tab instead of creating a new tab ?

The current behavior (opening a new tab) is problematic as it prevents me from accessing the session variables where I store the fact that a user is logged in (thus systematically prompting a password request).

Thanks for your help.

I have the same issue and wasn’t able to find a solution. I think LinkColumn would need to be changed to enable this.

AFAIK, there is no way to make a link column open in the same tab, unfortunately. As an alternative, if you’re liking to pages within your app, you might consider using https://docs.streamlit.io/develop/api-reference/widgets/st.page_link in combination with st.session_state in place of query paramaters (since currently st.page_link doesn’t support query parameters).

maybe we can add a ‘target’ option for LinkColumn, and apply it to the A tag when generating the HTML struct?

3 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.