Uses the input's registered Shiny binding to update the visible control
and notify the server. The id is the complete DOM ID, including any
module prefix (for example, "mod-text"); it is searched only in the
current scope, including the scope element itself. This does not set
unbound inputs, action buttons, or file inputs.
Arguments
- ctx
A paparazzi context.
- id
Full DOM ID of a bound Shiny input.
- value
Value accepted by the binding's
setValue(). Date ranges acceptc(start, end)orlist(start = ..., end = ...), with ISO date strings. Date-valued sliders accept ISO date strings, converted to JavaScript timestamps. Top-levelNULLand atomicNAare rejected.- ...
Checked empty; reserved for future use.
- wait
If
TRUE, callpz_wait_for_shiny_idle()after the change. IfFALSE, return immediately after dispatching the change.
Examples
if (FALSE) { # paparazzi:::examples_run("shiny")
page <- pz_open(pz_example("tasks-app"))
# Each call waits for Shiny to go idle, so the server has seen the value
page |>
pz_set_shiny_input("title", "Buy milk") |>
pz_set_shiny_input("priority", "high") |>
pz_act_click("#add") |>
pz_expect_text("3 tasks", target = "#summary")
pz_get_attr(page, "data-priority", target = ".task")
pz_close(page)
}
