Просмотр исходного кода

Update docs and %AND% import in shiny modified inputs

tags/v0.1.0^2
Garrick Aden-Buie 8 лет назад
Родитель
Сommit
63ff038d7e
3 измененных файлов: 21 добавлений и 6 удалений
  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 Просмотреть файл



#' Modified Text Area Input #' 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 #' @inheritParams shiny::textAreaInput
#' @param is_code Should the text input be considered verbatim code input?
textAreaInputAlt <- function(inputId, label, value = "", width = NULL, height = NULL, textAreaInputAlt <- function(inputId, label, value = "", width = NULL, height = NULL,
cols = NULL, rows = NULL, placeholder = NULL, resize = NULL, cols = NULL, rows = NULL, placeholder = NULL, resize = NULL,
is_code = TRUE) { is_code = TRUE) {
`%AND%` <- shiny:::`%AND%`
`%AND%` <- getFromNamespace("%AND%", "shiny")


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




#' Modified Text Input #' 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 #' @inheritParams shiny::textInput
#' @param width Width of `shiny-input-container` div.
textInputCode <- function(inputId, label, value = "", width = NULL, textInputCode <- function(inputId, label, value = "", width = NULL,
placeholder = NULL) { placeholder = NULL) {
`%AND%` <- shiny:::`%AND%`
`%AND%` <- getFromNamespace("%AND%", "shiny")
value <- shiny::restoreInput(id = inputId, default = value) value <- shiny::restoreInput(id = inputId, default = value)


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

+ 5
- 1
man/textAreaInputAlt.Rd Просмотреть файл

\code{"both"}, \code{"none"}, \code{"vertical"}, and \code{"horizontal"}. \code{"both"}, \code{"none"}, \code{"vertical"}, and \code{"horizontal"}.
The default, \code{NULL}, will use the client browser's default setting for The default, \code{NULL}, will use the client browser's default setting for
resizing textareas.} resizing textareas.}

\item{is_code}{Should the text input be considered verbatim code input?}
} }
\description{ \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 Просмотреть файл



\item{value}{Initial value.} \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 \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 be entered into the control. Internet Explorer 8 and 9 do not support this
option.} option.}
} }
\description{ \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`.
} }

Загрузка…
Отмена
Сохранить