-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathshiny-input_checkbox.R
51 lines (50 loc) · 1.2 KB
/
shiny-input_checkbox.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#' @inherit shiny::checkboxInput params return title description details sections references
#'
#' @inheritParams input_action_button
#' @param ... Ignored, included for future expansion.
#'
#' @seealso [update_checkbox()] to programmatically update a checkbox.
#'
#' @section Aliased from Shiny: `r docs_callout_shiny_alias("input_checkbox", "checkboxInput")`
#'
#' @family Shiny input aliases
#' @export
input_checkbox <- function(
id,
label,
value = FALSE,
...,
width = NULL
) {
shiny::checkboxInput(
inputId = id,
label = label,
value = value,
width = width
)
}
#' @inherit shiny::updateCheckboxInput params return title description details sections references
#'
#' @inheritParams input_action_button
#' @param ... Ignored, included for future expansion.
#'
#' @seealso [input_checkbox()] to create a checkbox.
#'
#' @section Aliased from Shiny: `r docs_callout_shiny_alias("update_checkbox", "updateCheckboxInput")`
#'
#' @family Shiny update aliases
#' @export
update_checkbox <- function(
id,
...,
label = NULL,
value = NULL,
session = get_current_session()
) {
shiny::updateCheckboxInput(
session = session,
inputId = id,
label = label,
value = value
)
}