Last active
November 9, 2022 08:26
-
-
Save tanho63/8ef8150eff420fdfa334be1834d6c559 to your computer and use it in GitHub Desktop.
pickerInput example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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