🥳  V1.1 is out. 

Check out our new release!

M

Reply To: Editing tables

Welcome to Taipy Forums Using Taipy Editing tables Reply To: Editing tables

#235646
martinshellmartinshell
Participant

Thanks for raising this issue. As you note, the unederlying data is updated but the table control does not automatically refresh. Taipy GUI is not “aware” of your edit as while the content of the DataFrame has changed, Taipy is still seeing the same DataFrame. Refreshing the browser causes Taipy to repopulate the table.
You are not doing anything wrong. If you would like to force Taipy GUI to refresh the table on edit, the simplest way is to make a copy of the DataFrame, edit that copy and replace the original with this “new” DataFrame In your example:

def myedit(state: State, varname: str, action: str, payload: dict) -> bool:
temp = state.amdres.copy()
temp.loc[payload[“index”], payload[“col”]] = payload[“value”]
state.amdres = temp
return True