anvilistas / tabulator

Anvil Wrapper for Tabulator
MIT License
18 stars 5 forks source link

Error when clicking a row - "multiple values for argument 'event'" #154

Closed telemix closed 2 months ago

telemix commented 2 months ago

Describe the bug I have an existing app that used to work, but now, when I click a row, I get this error :

TypeError: raise_event() got multiple values for argument 'event'
at app/tabulator/Tabulator/__init__.py:171

This is in the browser console output (let me know which bits specifically would help) : image

To Reproduce I cannot reproduce it in a minimal app, so this is specific to my app I think. I guess I need some help in debugging this to find out what I have done wrong.

The page is simple. I have a tabulator with a row click event handler, which never gets called when I click a row. This is how it's defined :

self.tabulator_list.columns = [
      {"title": "Account No.", "field": "id", "sorter": "number", "width": 200},
      {"title": "Name", "field": "name", "hoz_align": "left", "sorter": "text"},
      {
        "title": "Created",
        "field": "created_on",
        "hoz_align": "left",
        "formatter": "date",
        "sorter": "date",
        "sorter_params": {"format": "d/m/y"},
      },
    ]

    self.tabulator_list.options = {
      "selectable": "highlight",
    }

Additional context This app used to work. It is still in heavy development and much has changed recently, but moving back to an older version does not fix the issue.

I am considering making a PR for this issue No

telemix commented 2 months ago

This was fixed by @s-cork in the anvil-extra's "augment" library (details on the anvil forum )