Skip to content

Bug inside st.dataframe using the new column_config for links #8168

@lucasbalancin

Description

@lucasbalancin

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

Hey all,
I’m using the new version (1.31.0) locally, so I don’t have any links to provide but the bug is really simple (as shown an example below).
The new release for showing display_text using st.column_config.LinkColumn is really good. However, there’s one tiny bug. When you click the link inside the st.dataframe using it in the new version, it opens a new tab on your browser, as before. When you’re back to streamlit tab, it behaves like you’re selecting several rows and columns, just like you click and hold for the
dataframe.
Added a video as example!

streamlit.mp4

Let me know if I can be of any further help and thanks for everything!

Reproducible Code Example

Open in Streamlit Cloud

import streamlit as st
import pandas as pd

st.title('Bug using links inside dataframe with display_text')
df = pd.DataFrame({'a': [1, 2], 'b': ['http://www.google.com', 'http://www.streamlit.io']})
st.dataframe(df, column_config={"b": st.column_config.LinkColumn(
            "Links",
            help="Open Link",
            width="medium")})
st.dataframe(df, column_config={"b": st.column_config.LinkColumn(
            "Links",
            help="Open Link",
            width="medium",
            display_text="Open link",)})

Steps To Reproduce

  1. Click on any link
  2. Tab will open
  3. go back to streamlit tab
  4. it behaves as a click and hold on the table

Expected Behavior

When back to the tab, there are no selections

Current Behavior

It working normally, opening the link, but the back to the tab works as a click and hold.

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.31.0
  • Python version: 3.10
  • Operating System: CentOS 7
  • Browser: Firefox

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.dataframeRelated to the `st.dataframe` elementpriority:P3Medium prioritystatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions