Obtain registered input bindings
Usage
getInputBinding(fname, pkg = NULL, envir = parent.frame())
Arguments
- fname
input function name, character or quoted expression such as
'shiny::textInput'
ornumericInput
.- pkg
(optional), name of package
- envir
environment to evaluate
fname
ifpkg
is not provided
Examples
library(dipsaus)
# Most recommended usage
getInputBinding('compoundInput2', pkg = 'dipsaus')
#> $binding
#> [1] "dipsaus.compoundInput2"
#>
#> $update_function
#> [1] "dipsaus.updateCompoundInput2"
#>
#> $call_function
#> [1] "dipsaus::compoundInput2"
#>
# Other usages
getInputBinding('shiny::textInput')
#> $binding
#> [1] "shiny.textInput"
#>
#> $update_function
#> [1] "shiny::updateTextInput"
#>
#> $call_function
#> [1] "shiny::textInput"
#>
getInputBinding(shiny::textInput)
#> $binding
#> [1] "shiny.textInput"
#>
#> $update_function
#> [1] "shiny::updateTextInput"
#>
#> $call_function
#> [1] "shiny::textInput"
#>
getInputBinding(compoundInput2, pkg = 'dipsaus')
#> $binding
#> [1] "dipsaus.compoundInput2"
#>
#> $update_function
#> [1] "dipsaus.updateCompoundInput2"
#>
#> $call_function
#> [1] "dipsaus::compoundInput2"
#>
# Bad usage, raise errors in some cases
if (FALSE) {
## You need to library(shiny), or set envir=asNamespace('shiny'), or pkg='shiny'
getInputBinding('textInput')
getInputBinding(textInput) # also fails
## Always fails
getInputBinding('dipsaus::compoundInput2', pkg = 'dipsaus')
}