Kaynağa Gözat

Don't get functions from shiny's namespace

Fixes #22
main
Garrick Aden-Buie 5 yıl önce
ebeveyn
işleme
34131ab4bc
2 değiştirilmiş dosya ile 4 ekleme ve 5 silme
  1. +2
    -0
      NEWS.md
  2. +2
    -5
      R/shiny_modified_inputs.R

+ 2
- 0
NEWS.md Dosyayı Görüntüle

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

### 0.2.2


+ 2
- 5
R/shiny_modified_inputs.R Dosyayı Görüntüle

@@ -24,8 +24,6 @@ textAreaInputAlt <- function(
resize = NULL,
is_code = TRUE
) {
`%AND%` <- getFromNamespace("%AND%", "shiny")

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

if (!is.null(resize)) {
@@ -50,7 +48,7 @@ textAreaInputAlt <- function(

shiny::div(
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,
shiny::tags$textarea(
id = inputId,
@@ -86,13 +84,12 @@ textInputCode <- function(
placeholder = NULL,
...
) {
`%AND%` <- getFromNamespace("%AND%", "shiny")
value <- shiny::restoreInput(id = inputId, default = value)

shiny::div(
class = "input-group shiny-input-container",
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(
id = inputId,
type = "text",

Yükleniyor…
İptal
Kaydet