Skip to content

Commit

Permalink
Reloads should work in py-shiny.
Browse files Browse the repository at this point in the history
  • Loading branch information
filipstachura committed Dec 17, 2024
2 parents 3b4c30b + 3247851 commit 6d69a4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions examples/python/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def param():

@reactive.effect
async def redirect():
input.click()
# await session.send_custom_message("_shiny_router_change_url", {"url": "elo"})
counter = input.click()
if counter:
await session.send_custom_message("_shiny_router_change_url", {"url": "elo"})


app = App(app_ui, server)
2 changes: 1 addition & 1 deletion inst/www/shiny.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ const change_url = function(message) {
window.location.hash = url;
}

Shiny.addCustomMessageHandler("_shiny_router_change_url", change_url);
Shiny.addCustomMessageHandler("_shiny_router_change_url", change_url);
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6d69a4d

Please sign in to comment.