Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplication when clicking #9

Open
juandados opened this issue Jun 19, 2023 · 3 comments
Open

Duplication when clicking #9

juandados opened this issue Jun 19, 2023 · 3 comments

Comments

@juandados
Copy link

When running the README example, I am getting duplication of the HTML content after clicking (see gif below).

st-click-detector version 0.1.3
streamlit version 1.23.1
python 3.10

duplication

Script:

import streamlit as st
from st_click_detector import click_detector

content = """
    <p><a href='#' id='Link 1'>First link</a></p>
    <p><a href='#' id='Link 2'>Second link</a></p>
    <a href='#' id='Image 1'><img width='20%' src='https://images.unsplash.com/photo-1565130838609-c3a86655db61?w=200'></a>
    <a href='#' id='Image 2'><img width='20%' src='https://images.unsplash.com/photo-1565372195458-9de0b320ef04?w=200'></a>
    """
clicked = click_detector(content)

st.markdown(f"**{clicked} clicked**" if clicked != "" else "**No click**")
@parthplc
Copy link

Hey @juandados , I was also facing sometime random duplication any workaround?

@juandados
Copy link
Author

Unfortunately no, this issue is still happening in chrome, that is not the case on firefox, as far as I remember @parthplc. Not sure if restricting browser is a feasible option for you.

@mausam-digital
Copy link

Same here, I'm also seeing a duplicated widget. Just wished there was a workaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants