hi
how can i put an async callback to a param of type Action ?
thanks
class Test(param.Parameterized):
async def _action_cb(self):
await asyncio.sleep(1)
print('action_cb', self.data)
def panel(self):
return pn.Param(
self,
widgets={
'data': {
'widget_type': pn.widgets.JSONEditor,
'menu': False,
'search': False,
'mode': 'form',
'sizing_mode': 'stretch_both',
},
},
)
data = param.Dict()
action = param.Action(_action_cb)
obj = Test()
gui = obj.panel()
gui.show()
RuntimeWarning: coroutine ‘Test._action_cb’ was never awaited
value(self.object)