Toggles the visibility of the .vizmodules-input-cell that wraps a given input
(as laid out by organize_inputs()). Hiding the cell rather than just the input
itself lets the surrounding inputs reflow so the panel stays compact instead of
leaving an empty gap, as a plain shinyjs::hide() on the input would.
Usage
toggle_input_cell(session, ids, show)
Arguments
- session
The module session object (provides session$ns).
- ids
Character vector of un-namespaced input IDs to toggle.
- show
Logical; TRUE to show the cell, FALSE to hide it.
Value
Invisibly NULL, called for the side effect of running client-side JS.
Examples
if (FALSE) { # \dontrun{
# Call inside a module server, e.g. from an observeEvent():
toggle_input_cell(session, "size", show = input$show.size)
} # }