
Import streamlit. This is also using internal calls so you’d want to be wary.
#ELINKS FORCE REFRESH UPDATE#
You may be able to get the session id, then start a thread in the background that checks for any update before triggering a reload, but I’m unsure. While this does work, the problem is that as the script hasn’t finished none of your other widgets do anything until it does.
#ELINKS FORCE REFRESH CODE#
This takes code from the sessionstate hacks, and adds to the end of the page a while loop that waits for data to change before forcing a reload. I have a half-solution, though as far as I can tell the answer to whether it can support the pattern is “no, not in a supported way”. You need to do something like the following. In this case you cannot define your handler to accept an anonymous object with data and error properties. I was just trying to clarify the issues with reloading but the duplicate widget ID is probably the main one. To make refreshApex clear the client-side cache it is necessary to capture and store the entire result from the getRecord wire. So it would be great, if there was a possibility to create a custom (composite) widget too :-] And if you need to show a button and a progress bar for each action the user can take, your script will turn into algorithm that manages what is showing in those placeholders. The st.empty() placeholders must be created upfront.
#ELINKS FORCE REFRESH HOW TO#
But that cannot host buttons, unless I somehow generate the widget keys to be unique and figure out how to remove the button from the placeholder, when it should not show anymore.Īnd all of this only works if I knew up front all those buttons that will ever need to be displayed. The second pattern is the st.empty() as you suggested. If I could similarly interact with a st.button to enable/disable show/hide it for example, I could create that interactive experience. The progress is one of the few widgets that I can interact with. Streamlit has two patterns that seem close: with bar = st.progress(0): So what I am trying to achieve (and it looked like I was getting very very close) is to add additional buttons on the page, when I detect that those options just became possible (and hide them as soon as those issues are resolved). user has to take a decision, because the system got to some abnormal condition. As the system exposes, it gets to states, where certain user actions are possible (desirable) e.g. The user can look at the data and interact with the system. A bar appears across the top of the screen showing the words File, View, Link, Setup, Downloads, and Help. To display the elinks menu bar, press the Esc key. My Streamlit script is visualizing data from an evolving system. Here are some examples of elinks command lines: elinks Prompts for file name or URL elinks Opens file name or URL you request. Let me expand on my previous description. But what I cannot do with the placeholder trick is to add/remove buttons for example. I do pretty much exactly what you are showing and it works for incrementally adding to a chart (the documentation was pretty good for that).
