Explorar el Código

Don't get functions from shiny's namespace

Fixes #22
main
Garrick Aden-Buie hace 5 años
padre
commit
34131ab4bc
Se han modificado 2 ficheros con 4 adiciones y 5 borrados
  1. +2
    -0
      NEWS.md
  2. +2
    -5
      R/shiny_modified_inputs.R

+ 2
- 0
NEWS.md Ver fichero

* `regexplain_gadget()` now also returns the built regexp directly, enabling * `regexplain_gadget()` now also returns the built regexp directly, enabling
usage like `pattern <- regexplain_gadget()`. usage like `pattern <- regexplain_gadget()`.
* Fixed an issue with `shiny` version 1.6 (thanks @jthomasmock, #22)


### 0.2.2 ### 0.2.2



+ 2
- 5
R/shiny_modified_inputs.R Ver fichero

resize = NULL, resize = NULL,
is_code = TRUE is_code = TRUE
) { ) {
`%AND%` <- getFromNamespace("%AND%", "shiny")

value <- shiny::restoreInput(id = inputId, default = value) value <- shiny::restoreInput(id = inputId, default = value)


if (!is.null(resize)) { if (!is.null(resize)) {


shiny::div( shiny::div(
class = "form-group shiny-input-container", class = "form-group shiny-input-container",
label %AND% shiny::tags$label(label, `for` = inputId),
tags$label(label, `for` = inputId),
style = if (!parent_style %in% c(" ", "", " ")) parent_style, style = if (!parent_style %in% c(" ", "", " ")) parent_style,
shiny::tags$textarea( shiny::tags$textarea(
id = inputId, id = inputId,
placeholder = NULL, placeholder = NULL,
... ...
) { ) {
`%AND%` <- getFromNamespace("%AND%", "shiny")
value <- shiny::restoreInput(id = inputId, default = value) value <- shiny::restoreInput(id = inputId, default = value)


shiny::div( shiny::div(
class = "input-group shiny-input-container", class = "input-group shiny-input-container",
style = if (!is.null(width)) paste0("width: ", shiny::validateCssUnit(width), ";"), style = if (!is.null(width)) paste0("width: ", shiny::validateCssUnit(width), ";"),
label %AND% shiny::tags$label(label, `for` = inputId),
tags$label(label, `for` = inputId),
shiny::tags$input( shiny::tags$input(
id = inputId, id = inputId,
type = "text", type = "text",

Cargando…
Cancelar
Guardar