Search code examples
pythonipywidgetspy-shiny

Is there an interactive table widget for Shiny for python that calls back selected rows?


I'm using reactable, Datatable or rhandsontable in R Shiny to display an interactive table and as a user input for selecting rows. Given there are a few packages for doing this in R, I thought there would be even more libraries in python for selecting rows from an interactive table - however I haven't found one yet. Please let me know if one exists.


Solution

  • I also love the way Datatable works for shiny R, and have been searching for an equivalent in shiny Python. The latest release of shiny Python (0.4) has a new feature "data grid / data table" that looks promising ! Here are the links to the release announcement and the API documentation:

    https://shiny.posit.co/blog/posts/shiny-python-0.4.0/

    https://shiny.posit.co/py/api/render.DataTable.html

    They show an example of getting the selected rows in a callback (as you asked)

    Hope this helps