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”
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.