Open boxed opened 1 month ago
I have one more idea about this
the endpoints__tbody__func
would be defined outside the Table, so people can do
class MyTable:
class Meta:
@staticmethod
def endpoints__tbody__func(table, **kwargs):
r = iommi_default_table_endpoints__tbody__func(table, **kwargs)
r["foo"] = table.extra_evaluated.foo
return r
and then in the JS we could add the response to the dispatch of iommi.element.populated
event (or make another event for that)
that way the tbody
can return more custom stuff... lets say some extra_evaluated
that you have outside of container, but may depend on filter/paginator. E.g. number of filtered objects somewhere in the h1, or any data for charts or whatever
After a discussion on Discord: the actions needs to be reloaded to get filters included in CSV download button.
Bery: hmm, you'll probably need data-iommi-id-of-table like the filter has, so you know which actions to replace