Skip to content

Instantly share code, notes, and snippets.

@tanho63
Last active November 9, 2022 08:26
Show Gist options
  • Save tanho63/8ef8150eff420fdfa334be1834d6c559 to your computer and use it in GitHub Desktop.
Save tanho63/8ef8150eff420fdfa334be1834d6c559 to your computer and use it in GitHub Desktop.
pickerInput example
positions <- data.frame(pos = c("QB","RB","WR","TE"),
posdesc = c("Quarterback","Running Back","Wide Receiver","Tight End"))
shinyWidgets::pickerInput(
inputId = 'positions',
label = 'position',
choices = positions$pos,
selected = positions$pos,
multiple = TRUE,
options = list(
`actions-box` = TRUE, # select-all/deselect-all
`live-search` = TRUE, # search the options
`selected-text-format` = "count > 1"), # show "N options selected" for more than 1 selection
choicesOpt = list(`subtext` = positions$posdesc) # optional subtitle, for maximum swag
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment