Closed KuriaMaingi closed 1 month ago
You forgot to assign your value to the state. Every interactive element in Taipy uses the f-string format with the state. The real-time value of a variable is known with state.your_variable
. To change a variable, state.your_variable = new_value
. This allows Taipy to change specifically what needs to be changed in your app.
Here, you are using partials, which is advanced for Taipy. The syntax resembles the Streamlit syntax, but Taipy does not work the same. We use callbacks and variable binding to be able to be more performant for multi-user, multi-page applications, to be able to broadcast variables to other users, and to be scalable.
df_results = state.response_dict["result_value"].copy()
should be:
state.df_results = state.response_dict["result_value"].copy()
Taipy was showing you the current/initial value of state.df_result instead of the updated one, so you didn't get any errors in the console.
Please read the Getting Started or the GUI tutorial here for more info.
A new visual element will be released next September that will allow you to not use partials.
Brilliant. Makes sense on how the callbacks are triggered as I was missing that bit of logic. Works now
What went wrong? 🤔
I have written a somewhat simplified bit of code that matches my current usage pattern so apologies if it is a bit long.
There are no console errors and the dataframe is accessible within the method (printed to console to check)
The output I get on the web app is as follows:
Expected Behavior
I expected to see both the response text as well as a rendered tgb.table populated with data from the dataframe
Steps to Reproduce Issue
Solution Proposed
No response
Screenshots
Runtime Environment
Windows 11 Home, Chrome Browser, Taipy 3.1.1, tabulate 0.9.0
Browsers
Chrome
OS
Windows
Version of Taipy
3.1.1
Additional Context
Acceptance Criteria
Code of Conduct