Skip to content

Commit

Permalink
docs(events): update core features
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Sep 18, 2023
1 parent 0b48852 commit 8617dc1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/core_features/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ def method_4(*args, **kwargs):
state.a += 10


ctrl.alias_3 = method_4

# -----------------------------------------------------------------------------
# UI setup
# -----------------------------------------------------------------------------
Expand All @@ -60,9 +58,13 @@ def method_4(*args, **kwargs):
html.Button(f"Method 3", click=(method_3, "[1, 2]", "{ x: 3, y: 4 }"))
html.Button(f"alias_1", click=(ctrl.alias_1, "[2]", "{ z: 4 }"))
html.Button(f"alias_2", click=(ctrl.alias_2, "[3]", "{ z: 5 }"))
html.Button(f"alias_3", click=(ctrl.alias_3, "[4]", "{ z: 6 }"))
html.Button(f"a+", click="a+=1")


# Can be defined after usage
ctrl.alias_3 = method_4

# -----------------------------------------------------------------------------
# start server
# -----------------------------------------------------------------------------
Expand Down

0 comments on commit 8617dc1

Please sign in to comment.