Hello @everyone,
I am excited to connect with you.
There are a few challenges to building a streamlit app.
I am building “Tents and Trees” puzzle solver app. Do you know about it?
In my UI, there are two buttons (“Create”, “Solve”). When I click the “Create” button, I see the input grid map, and when I click the “Solve” button, I see the solution grid map. But when I see the solution grid map, the input grid map disappears with it. Also, below the solution map is a step slider to show all steps of solution, but when I click the slider, the solution map disappears. This is driving me crazy.
Beyond that, there are a few other issues, such as customizing the size of elements and containers, the position of elements, etc.
I’ve attached some images to help you understand.
Please help me with this issue. I need to resolve this issue ASAP.
Regards.
It seems like the issue with the solution map disappearing could be related to the st.slider widget as it updates every time you click and drag it.
“Every time a user interacts with a widget, Streamlit simply reruns your script from top to bottom, assigning the current state of the widget to your variable in the process.” (Learn more about streamlit widget flows).
So, my assumption is that because it reruns the script it probably takes time to render the grid map again.
You can Inspect Element the page and then find the class name of the container you would like to modify. For example; the component I’d like to modify has a class and its value is “st-emotion-cache-1r6slb0”