This is a simple question: I'm having a hard time finding a documentation of what can go into the choicesOpt
argument of pickerInput
. I've tried Google, Stackoverflow and most of the doc-sites I know and tried looking in the source of the package yet haven't found anything. Could someone point me in the right direction?
R shiny pickerinput choicesOpt
1.2k views Asked by sedsiv At
2
There are 2 answers
0
On
choicesOpt
argument is useful to apply formatting to the inputs of pickerInput
.
For example to give background to the options of pickerInput
you can do :
library(shiny)
cols <- c('blue', 'green', 'red', 'yellow')
ui <- fluidPage(
pickerInput("col", "Colour", choices = cols,
choicesOpt = list(style = sprintf('background:%s;', cols)))
)
server <- function(input, output){}
shinyApp(ui, server)
Select picker Input Control, i.e. the
pickerInput
is built on top ofbootstrap-select
, documentation for all the options is here