Skip to content

Commit e84012e

Browse files
committed
Update input docs to explain NULL label (rstudio#727)
1 parent 7b76951 commit e84012e

12 files changed

+36
-49
lines changed

R/bootstrap.R

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ conditionalPanel <- function(condition, ...) {
427427
#'
428428
#' Create an input control for entry of unstructured text values
429429
#'
430-
#' @param inputId Input variable to assign the control's value to
431-
#' @param label Display label for the control
432-
#' @param value Initial value
430+
#' @param inputId The \code{input} slot that will be used to access the value.
431+
#' @param label Display label for the control, or \code{NULL} for no label.
432+
#' @param value Initial value.
433433
#' @return A text input control that can be added to a UI definition.
434434
#'
435435
#' @family input elements
@@ -469,9 +469,7 @@ passwordInput <- function(inputId, label, value = "") {
469469
#'
470470
#' Create an input control for entry of numeric values
471471
#'
472-
#' @param inputId Input variable to assign the control's value to
473-
#' @param label Display label for the control
474-
#' @param value Initial value
472+
#' @inheritParams textInput
475473
#' @param min Minimum allowed value
476474
#' @param max Maximum allowed value
477475
#' @param step Interval to use when stepping between min and max
@@ -526,8 +524,7 @@ numericInput <- function(inputId, label, value, min = NA, max = NA, step = NA) {
526524
#'
527525
#' @family input elements
528526
#'
529-
#' @param inputId Input variable to assign the control's value to.
530-
#' @param label Display label for the control.
527+
#' @inheritParams textInput
531528
#' @param multiple Whether the user should be allowed to select and upload
532529
#' multiple files at once. \bold{Does not work on older browsers, including
533530
#' Internet Explorer 9 and earlier.}
@@ -558,8 +555,7 @@ fileInput <- function(inputId, label, multiple = FALSE, accept = NULL) {
558555
#'
559556
#' Create a checkbox that can be used to specify logical values.
560557
#'
561-
#' @param inputId Input variable to assign the control's value to.
562-
#' @param label Display label for the control.
558+
#' @inheritParams textInput
563559
#' @param value Initial value (\code{TRUE} or \code{FALSE}).
564560
#' @return A checkbox control that can be added to a UI definition.
565561
#'
@@ -588,8 +584,7 @@ checkboxInput <- function(inputId, label, value = FALSE) {
588584
#' independently. The server will receive the input as a character vector of the
589585
#' selected values.
590586
#'
591-
#' @param inputId Input variable to assign the control's value to.
592-
#' @param label Display label for the control, or \code{NULL}.
587+
#' @inheritParams textInput
593588
#' @param choices List of values to show checkboxes for. If elements of the list
594589
#' are named then that name rather than the value is displayed to the user.
595590
#' @param selected The values that should be initially selected, if any.
@@ -758,8 +753,7 @@ choicesWithNames <- function(choices) {
758753
#' to instead of the basic select input element. To use the standard HTML select
759754
#' input element, use \code{selectInput()} with \code{selectize=FALSE}.
760755
#'
761-
#' @param inputId Input variable to assign the control's value to
762-
#' @param label Display label for the control, or \code{NULL}
756+
#' @inheritParams textInput
763757
#' @param choices List of values to select from. If elements of the list are
764758
#' named then that name rather than the value is displayed to the user.
765759
#' @param selected The initially selected value (or multiple values if
@@ -906,8 +900,7 @@ selectizeIt <- function(inputId, select, options, nonempty = FALSE) {
906900
#'
907901
#' Create a set of radio buttons used to select an item from a list.
908902
#'
909-
#' @param inputId Input variable to assign the control's value to
910-
#' @param label Display label for the control, or \code{NULL}
903+
#' @inheritParams textInput
911904
#' @param choices List of values to select from (if elements of the list are
912905
#' named then that name rather than the value is displayed to the user)
913906
#' @param selected The initially selected value (if not specified then
@@ -1023,10 +1016,7 @@ actionLink <- function(inputId, label, icon = NULL, ...) {
10231016
#'
10241017
#' Constructs a slider widget to select a numeric value from a range.
10251018
#'
1026-
#' @param inputId Specifies the \code{input} slot that will be used to access
1027-
#' the value.
1028-
#' @param label A descriptive label to be displayed with the widget, or
1029-
#' \code{NULL}.
1019+
#' @inheritParams textInput
10301020
#' @param min The minimum value (inclusive) that can be selected.
10311021
#' @param max The maximum value (inclusive) that can be selected.
10321022
#' @param value The initial value of the slider. A numeric vector of length
@@ -1187,8 +1177,7 @@ datePickerDependency <- htmlDependency(
11871177
#' \item \code{DD} Full weekday name
11881178
#' }
11891179
#'
1190-
#' @param inputId Input variable to assign the control's value to.
1191-
#' @param label Display label for the control, or \code{NULL}.
1180+
#' @inheritParams textInput
11921181
#' @param value The starting date. Either a Date object, or a string in
11931182
#' \code{yyyy-mm-dd} format. If NULL (the default), will use the current
11941183
#' date in the client's time zone.

man/checkboxGroupInput.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
checkboxGroupInput(inputId, label, choices, selected = NULL, inline = FALSE)
88
}
99
\arguments{
10-
\item{inputId}{Input variable to assign the control's value to.}
10+
\item{inputId}{The \code{input} slot that will be used to access the value.}
1111

12-
\item{label}{Display label for the control, or \code{NULL}.}
12+
\item{label}{Display label for the control, or \code{NULL} for no label.}
1313

1414
\item{choices}{List of values to show checkboxes for. If elements of the list
1515
are named then that name rather than the value is displayed to the user.}

man/checkboxInput.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
checkboxInput(inputId, label, value = FALSE)
88
}
99
\arguments{
10-
\item{inputId}{Input variable to assign the control's value to.}
10+
\item{inputId}{The \code{input} slot that will be used to access the value.}
1111

12-
\item{label}{Display label for the control.}
12+
\item{label}{Display label for the control, or \code{NULL} for no label.}
1313

1414
\item{value}{Initial value (\code{TRUE} or \code{FALSE}).}
1515
}

man/dateInput.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ dateInput(inputId, label, value = NULL, min = NULL, max = NULL,
99
language = "en")
1010
}
1111
\arguments{
12-
\item{inputId}{Input variable to assign the control's value to.}
12+
\item{inputId}{The \code{input} slot that will be used to access the value.}
1313

14-
\item{label}{Display label for the control, or \code{NULL}.}
14+
\item{label}{Display label for the control, or \code{NULL} for no label.}
1515

1616
\item{value}{The starting date. Either a Date object, or a string in
1717
\code{yyyy-mm-dd} format. If NULL (the default), will use the current

man/dateRangeInput.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ dateRangeInput(inputId, label, start = NULL, end = NULL, min = NULL,
99
language = "en", separator = " to ")
1010
}
1111
\arguments{
12-
\item{inputId}{Input variable to assign the control's value to.}
12+
\item{inputId}{The \code{input} slot that will be used to access the value.}
1313

14-
\item{label}{Display label for the control, or \code{NULL}.}
14+
\item{label}{Display label for the control, or \code{NULL} for no label.}
1515

1616
\item{start}{The initial start date. Either a Date object, or a string in
1717
\code{yyyy-mm-dd} format. If NULL (the default), will use the current

man/fileInput.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
fileInput(inputId, label, multiple = FALSE, accept = NULL)
88
}
99
\arguments{
10-
\item{inputId}{Input variable to assign the control's value to.}
10+
\item{inputId}{The \code{input} slot that will be used to access the value.}
1111

12-
\item{label}{Display label for the control.}
12+
\item{label}{Display label for the control, or \code{NULL} for no label.}
1313

1414
\item{multiple}{Whether the user should be allowed to select and upload
1515
multiple files at once. \bold{Does not work on older browsers, including

man/numericInput.Rd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
numericInput(inputId, label, value, min = NA, max = NA, step = NA)
88
}
99
\arguments{
10-
\item{inputId}{Input variable to assign the control's value to}
10+
\item{inputId}{The \code{input} slot that will be used to access the value.}
1111

12-
\item{label}{Display label for the control}
12+
\item{label}{Display label for the control, or \code{NULL} for no label.}
1313

14-
\item{value}{Initial value}
14+
\item{value}{Initial value.}
1515

1616
\item{min}{Minimum allowed value}
1717

man/passwordInput.Rd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
passwordInput(inputId, label, value = "")
88
}
99
\arguments{
10-
\item{inputId}{Input variable to assign the control's value to}
10+
\item{inputId}{The \code{input} slot that will be used to access the value.}
1111

12-
\item{label}{Display label for the control}
12+
\item{label}{Display label for the control, or \code{NULL} for no label.}
1313

14-
\item{value}{Initial value}
14+
\item{value}{Initial value.}
1515
}
1616
\value{
1717
A text input control that can be added to a UI definition.

man/radioButtons.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
radioButtons(inputId, label, choices, selected = NULL, inline = FALSE)
88
}
99
\arguments{
10-
\item{inputId}{Input variable to assign the control's value to}
10+
\item{inputId}{The \code{input} slot that will be used to access the value.}
1111

12-
\item{label}{Display label for the control, or \code{NULL}}
12+
\item{label}{Display label for the control, or \code{NULL} for no label.}
1313

1414
\item{choices}{List of values to select from (if elements of the list are
1515
named then that name rather than the value is displayed to the user)}

man/selectInput.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ selectInput(inputId, label, choices, selected = NULL, multiple = FALSE,
1111
selectizeInput(inputId, ..., options = NULL, width = NULL)
1212
}
1313
\arguments{
14-
\item{inputId}{Input variable to assign the control's value to}
14+
\item{inputId}{The \code{input} slot that will be used to access the value.}
1515

16-
\item{label}{Display label for the control, or \code{NULL}}
16+
\item{label}{Display label for the control, or \code{NULL} for no label.}
1717

1818
\item{choices}{List of values to select from. If elements of the list are
1919
named then that name rather than the value is displayed to the user.}

0 commit comments

Comments
 (0)