Skip to content

Commit a96e73c

Browse files
committed
Replace @event with @reactive.event
1 parent 6443a89 commit a96e73c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/superzip/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _():
197197

198198
# When the variable changes, either update marker colors or redraw the heatmap
199199
@reactive.Effect
200-
@event(input.variable)
200+
@reactive.event(input.variable)
201201
def _():
202202
zips = zips_in_bounds()
203203
if not show_markers():
@@ -213,7 +213,7 @@ def _():
213213

214214
# When bounds change, maybe add new markers
215215
@reactive.Effect
216-
@event(lambda: zips_in_bounds())
216+
@reactive.event(lambda: zips_in_bounds())
217217
def _():
218218
if not show_markers():
219219
return
@@ -233,7 +233,7 @@ def _():
233233
# Change from heatmap to markers: remove the heatmap and show markers
234234
# Change from markers to heatmap: hide the markers and add the heatmap
235235
@reactive.Effect
236-
@event(show_markers)
236+
@reactive.event(show_markers)
237237
def _():
238238
if show_markers():
239239
map.remove_layer(layer_heatmap())
@@ -419,7 +419,7 @@ def _():
419419
# but I _think_ this'll get fixed in the next release of ipywidgets/ipyleaflet
420420
# https://github.com/jupyter-widgets/ipywidgets/issues/3384
421421
@reactive.Effect
422-
@event(selected_table_row)
422+
@reactive.event(selected_table_row)
423423
def _():
424424
for x in table_map.layers:
425425
if x.name.startswith("marker"):

shinywidgets/_shinywidgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def init_shiny_widget(w: Widget):
121121
# Handle messages from the client. Note that widgets like qgrid send client->server messages
122122
# to figure out things like what filter to be shown in the table.
123123
@reactive.Effect
124-
@event(session.input["shinywidgets_comm_send"])
124+
@reactive.event(session.input["shinywidgets_comm_send"])
125125
def _():
126126
msg_txt = session.input["shinywidgets_comm_send"]()
127127
msg = json.loads(msg_txt)

0 commit comments

Comments
 (0)