Skip to content

[Bug]: session.on_flushed callbacks do not trigger messages being sent to client #1889

@jcheng5

Description

@jcheng5

Component

Reactive Programming

Severity

P2 - Medium (workaround exists)

Shiny Version

1.3.0

Python Version

Any (including pyodide)

Minimal Reproducible Example

shinylive

from shiny.express import input, render, ui, session

ui.input_text("foo", "Foo")

@session.on_flushed
def _():
    ui.update_text("foo", value = "Flushed")

Behavior

In the example above, ui.update_text() is called, but because it's part of an on_flushed, it doesn't actually get sent to the client. (If the app had some other outputs/effects, then the next time a flush naturally occurred, then the update_text would take effect.)

Here's the same example in R, which doesn't exhibit the problem.

Error Messages (if any)

Environment

shinylive.io

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions