FabienArcellier / writer-framework

No-code in the front, Python in the back. An open-source framework for creating data apps.
https://streamsync.cloud
Apache License 2.0
0 stars 1 forks source link

capture the component that trigger an event in context #48

Closed FabienArcellier closed 4 months ago

FabienArcellier commented 5 months ago

On a click or an event, a developer can consult the identifier at the origin of the event from the context. This allows it to adapt the behavior of its event handler or to retrieve the parent to add interface components.

def increment(state, context):
    print(context['target'])
def increment(state, ui, context):
   container = ui.parent(context['target'])
    with ui.find(container):
      pass
def increment(state, ui, context):
   container = ui.parent(context['target'], level=3) # third parent
    with ui.find(container):
      pass

definition of done