Anvil Tabulator Custom Filter Issue

I’m attempting to use a custom filter with set_filter() using the Anvil Extras Tabulator wrapper. This section in the docs does not seem to be up to date.

in Anvil Tabulator

def custom_filter(data, **params):
return data[“name”] == “bob” and data[“height”] < params[“height”]

self.tabulator.set_filter(custom_filter, {“height”:3})

When I use that syntax I get
ExternalError: TypeError: Cannot redefine property: func

Curious if the docs just need to be updated here?

I just tested this code in the example and works as expected.
Could you create a minimal example clone that demonstrates the issue so that I can take a look.

(Please wrap code in ``` backticks for readability instead of using >)

Well, I apologize but I created a new app to share a clone link and was able to get it working. Seems to have been an issue with an older custom Tabulator import. Removing the old import solved the issue on both ends.

1 Like