Hi. I’m developing an app that takes a number input from a user. But sometimes when user click ‘+’ or ‘-’ button input field resets on default value (see on gif).
I use this code:
where self.pred_slot2 - is st.empty() what saved before.
I understand what the value may changing to default after the button press. But if i clear understand - value don’t changed to default then user uses ‘+’ or ‘-’ button.
Can I avoid this some way? Am I doing something wrong?
Can you provide more of a code snippet so that we can try to debug? I see what you are saying in the gif, but without knowing how all of the code is interacting, it’s hard to say what the issue might be.
What is interesting for me is that if I use st.number_input it works as expected. I also have other number inputs using the column style layout that work completely normally.