okld / streamlit-elements

Create a draggable and resizable dashboard in Streamlit, featuring Material UI widgets, Monaco editor (Visual Studio Code), Nivo charts, and more!
MIT License
734 stars 82 forks source link

MUI elements, with event Listener consecutive activation crashes streamlit #29

Open hkhako opened 1 year ago

hkhako commented 1 year ago

I have one or more mui elements with an onmouseover, or onclick event handler. When they are being activated closely together time-wise, ie: the mouse swipe over several onmouseover objects, or repeatedly click a mui.typography with onclick listener, it throws error and crashes streamlit. It is possibly due to streamlit being reloading, and the targets are being regenerated. A global debounce mechanism for all mouse and touch events might be a solution.