Closed gbritoda closed 1 year ago
In Taipy 3.0, the action parameter of the on_action callback was removed for every control. This is a breaking change that you can find in Release Notes. The signature of all on_action() callback functions are now unified to the following:
Did you have any use of it in Taipy 2.4?
Oh right!
No, I did not use it, and even if I did I can still use it on the payload dict. I also just realised that the documentation I was looking at was not for the 3.0.0 release! Sorry about that, will close the issue!
Description On TaiPy 2.4.0, whenever a table called
on_action
, thepayload
variable contained the index, col etc. And this is what is expected according to the documentation.However, in TaiPy 3.0.0 this seems to have gone to the
action
field andpayload
isNone
How to reproduce Click on any row of the table and
on_table_action
will be called.Then check the printout, it is:
on_table_action: {'state': <taipy.gui.state.State object at 0x7f60d8311750>, 'var_name': 'data', 'action': {'action': 'on_table_action', 'index': 2, 'col': 'X', 'args': []}, 'payload': None}
Expected behavior Printout should be
on_table_action: {'state': <taipy.gui.state.State object at 0x7f0a2f65f7c0>, 'var_name': 'data', 'action': 'on_table_action', 'payload': {'action': 'on_table_action', 'index': 3, 'args': []}}
, and in fact, it is what I get when using python 2.4.0Runtime environment TaiPy 3.0.0