Skip to content

Commit 6d69a4d

Browse files
committed
Reloads should work in py-shiny.
2 parents 3b4c30b + 3247851 commit 6d69a4d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

examples/python/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ def param():
4848

4949
@reactive.effect
5050
async def redirect():
51-
input.click()
52-
# await session.send_custom_message("_shiny_router_change_url", {"url": "elo"})
51+
counter = input.click()
52+
if counter:
53+
await session.send_custom_message("_shiny_router_change_url", {"url": "elo"})
5354

5455

5556
app = App(app_ui, server)

inst/www/shiny.router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ const change_url = function(message) {
6262
window.location.hash = url;
6363
}
6464

65-
Shiny.addCustomMessageHandler("_shiny_router_change_url", change_url);
65+
Shiny.addCustomMessageHandler("_shiny_router_change_url", change_url);

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)