I am using st.data_editor so that the user can input data in the project. Point is, when I use ‘on_change’ to call a function ‘ABC’, that receives as input that same data, the function is called on the previous data, not on the ‘changed’ data.
If applicable, please provide the steps we should take to reproduce the error or specified behavior.
Expected behavior / Actual behavior
It was expected the the function ABC was run with the new st.session_state[‘demanda_sugerida_unica_edit’] value, but it’s running with the old value instead.
In other words, if my current value is X and I change it to Y, I need my function ABC to be ran with Y, not X.
So, the link you sent is basically the same problem I am facing and there is no solution on that.
Let’s say I my original value is A.
When I change it, it calls a function, which uses my value to do some calculation. The problem is, when I change my value from A to B, the function is ran with A.
When I change my value from B to C, then my function uses B.
If i change my value from A to B, i need my function to use the uptaded value, which is not happening.
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.