-
Is there a way to prevent the automatic I want to set the table to a |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
I found this, reading the code: @tabulator_module("query")
class QueryModule(AbstractModule):
def __init__(self, mod, table):
super().__init__(mod, table)
mod.registerTableOption("initialQuery", EMPTY_QUERY)
mod.registerTableFunction("setQuery", self.set_query)
mod.registerTableFunction("clearQuery", self.clear_query)
self.query = EMPTY_QUERY
def initialize(self):
if self.table.options.get("appTable") is None:
return
self.mod.subscribe("data-params", self.query_params)
self.query = self.table.options.get("initialQuery", EMPTY_QUERY) So I Think I can use the |
Beta Was this translation helpful? Give feedback.
-
That's exactly what I was looking for. I think with the Query object being accessible, it probably is better to keep it fixed to just using that. Thank you Stu! |
Beta Was this translation helpful? Give feedback.
Ah yeah you're right in the issue but the fix is wrong here because the point was to allow both args and kwargs.
Sorry i should have pointed you to this discussion:
#98
The correct fix is gonna be document and throw a TypeError if an instance of Query is not provided.