Skip to content

Commit

Permalink
formatter: filter out on_rendered if we're a component
Browse files Browse the repository at this point in the history
  • Loading branch information
s-cork committed Nov 8, 2023
1 parent 1a55402 commit d065b86
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client_code/Tabulator/_custom_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,19 @@ def cell_wrapper(f):
return lambda cell, **params: f(cell=cell, **params)
elif hasattr(f, "init_components"):
# TODO - this could break if trying to use as both an editor and a headerFilter
def render_form(cell, **params):
def render_form(cell, on_rendered=None, **params):
data = cell.getData("data")
if type(data) is JsProxy:
data = dict(data)
return f(item=data, cell=cell, **params)

return render_form
else:
return lambda cell, **params: f(**params)

def render_component(cell, on_rendered=None, **params):
return f(**params)

return render_component


class AbstractCallableWrapper(AbstractModule):
Expand Down

0 comments on commit d065b86

Please sign in to comment.