Closed maxmoro closed 4 weeks ago
@maxmoro Thank you for the reprex!
Your code works, just needs to add async
(for click
) and await
the update method:
@reactive.Effect
@reactive.event(input.click)
async def click():
print('a')
x={'type': 'row', 'rows': (4)}
await penguins_df.update_cell_selection(x)
Link to updated shinylive app.
https://github.com/posit-dev/py-shiny/assets/93231/4311b139-44ab-45e6-bb58-0785c17cfb49
Amazing! Thank you very much.
Is it possibile to have an example of the
update_cell_selection
method? I'm trying to use it but I see no effect In this code I was tryng to set a selected row when a user clicks a button.