Tabulator v3 isn't handling row selection

What I’m trying to do:
Use the Tabulator dependency and enable row selection.

What I’ve tried and what’s not working:
I’ve created a minimal example that imports the Tabulator dependency, adds a tabulator component to the UI, does the most basic configuration, and populates the table with a few literal rows. This works as expected. Then I added self.tabulator_1.options.update(selectable=True) so that I could interactively select rows. I expected to see some kind of highlight when I click rows. No visual indication of selection. I also added a bit of code in ...row_selection_changed() to print out rows that were selected. Again, nothing printed when I click on rows.

Then when I change the version of the Tabulator dependency from 3.1.0 to 2.2.22 and rerun it, I see a visual indication of the row selection as well as output to the app console when I click rows. The failure seems to happen for all 3.* versions of Tabulator.

Clone link:
Here’s a minimal example app:
share a copy of your app

(Let me know if this should be posted somewhere else as it is an external dependency and not core Anvil)

Thanks for pointing that out, it looks like we missed an update when upgraded the version of Tabulator.

selectableselectableRows

we’ll get that fixed.
For now just replace your selectable with selectableRows

I’d also recommend using the row_selection_column

from tabulator.Tabulator import row_selection_column

...

    self.tabulator.columns = [
        row_selection_column,
        {"title": "Name", "field": "name", ...},
        ...
    ]

Edit this should now work in 3.1.1

Thanks, @stucork! I can confirm setting selectableRows worked on 3.1.0 and both selectable and selectableRows worked with 3.1.1.

And thanks for the row_selection_column nudge. Useful!

I appreciate the fix!