Procházet zdrojové kódy

Update docs and %AND% import in shiny modified inputs

tags/v0.1.0^2
Garrick Aden-Buie před 8 roky
rodič
revize
63ff038d7e
3 změnil soubory, kde provedl 21 přidání a 6 odebrání
  1. +12
    -2
      R/shiny_modified_inputs.R
  2. +5
    -1
      man/textAreaInputAlt.Rd
  3. +4
    -3
      man/textInputCode.Rd

+ 12
- 2
R/shiny_modified_inputs.R Zobrazit soubor

@@ -5,11 +5,16 @@

#' Modified Text Area Input
#'
#' Standard [shiny::textAreaInput()] with additional `is_code` parameter, added
#' code font style for the input text and with `autocomplete`, `autocorrect`,
#' `autocapitalize` and `spellcheck` set to `off` or `false`.
#'
#' @inheritParams shiny::textAreaInput
#' @param is_code Should the text input be considered verbatim code input?
textAreaInputAlt <- function(inputId, label, value = "", width = NULL, height = NULL,
cols = NULL, rows = NULL, placeholder = NULL, resize = NULL,
is_code = TRUE) {
`%AND%` <- shiny:::`%AND%`
`%AND%` <- getFromNamespace("%AND%", "shiny")

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

@@ -54,10 +59,15 @@ textAreaInputAlt <- function(inputId, label, value = "", width = NULL, height =

#' Modified Text Input
#'
#' Standard [shiny::textInput()] with additional `width` parameter, added code
#' font style for the input text and with `autocomplete`, `autocorrect`,
#' `autocapitalize` and `spellcheck` set to `off` or `false`.
#'
#' @inheritParams shiny::textInput
#' @param width Width of `shiny-input-container` div.
textInputCode <- function(inputId, label, value = "", width = NULL,
placeholder = NULL) {
`%AND%` <- shiny:::`%AND%`
`%AND%` <- getFromNamespace("%AND%", "shiny")
value <- shiny::restoreInput(id = inputId, default = value)

shiny::div(class = "form-group shiny-input-container",

+ 5
- 1
man/textAreaInputAlt.Rd Zobrazit soubor

@@ -37,7 +37,11 @@ option.}
\code{"both"}, \code{"none"}, \code{"vertical"}, and \code{"horizontal"}.
The default, \code{NULL}, will use the client browser's default setting for
resizing textareas.}

\item{is_code}{Should the text input be considered verbatim code input?}
}
\description{
Modified Text Area Input
Standard [shiny::textAreaInput()] with additional `is_code` parameter, added
code font style for the input text and with `autocomplete`, `autocorrect`,
`autocapitalize` and `spellcheck` set to `off` or `false`.
}

+ 4
- 3
man/textInputCode.Rd Zobrazit soubor

@@ -14,13 +14,14 @@ textInputCode(inputId, label, value = "", width = NULL,

\item{value}{Initial value.}

\item{width}{The width of the input, e.g. \code{'400px'}, or \code{'100\%'};
see \code{\link{validateCssUnit}}.}
\item{width}{Width of `shiny-input-container` div.}

\item{placeholder}{A character string giving the user a hint as to what can
be entered into the control. Internet Explorer 8 and 9 do not support this
option.}
}
\description{
Modified Text Input
Standard [shiny::textInput()] with additional `width` parameter, added code
font style for the input text and with `autocomplete`, `autocorrect`,
`autocapitalize` and `spellcheck` set to `off` or `false`.
}

Načítá se…
Zrušit
Uložit