1

With current version of shiny (1.7.1) and shinyWidgets (0.6.3) I got something strange. I can't figure out why independent pickerInput(s) share the same "tick-icon" while I set something different in the options. Looks like somewhere the first tick-icon is taken as a global option and overwrites my settings. Does anyone knows where this overwriting happened? Is it a shiny or shinyWidgets or a bootstrap issue?

library(shinyWidgets)
library(shiny)


shinyApp(
  ui = fluidPage(
    pickerInput(
      inputId = "sort",
      label = "sort",
      choices = c("a", "b", "c", "d"),
      multiple = TRUE,
      options = list("tick-icon" = "glyphicon-sort")
    ),
    pickerInput(
      inputId = "ok",
      label = "ok",
      choices = c("a", "b", "c", "d"),
      multiple = TRUE,
      options = list("tick-icon" = "glyphicon-ok")
    )
  ),
  server = function(input, output) {
    NULL
  }
)

enter image description here

GoGonzo
  • 2,637
  • 1
  • 18
  • 25

1 Answers1

0

Please use the following code to get glyphicon-ok-sign

options = list("tick-icon" = "glyphicon glyphicon-ok-sign")

Full code:

library(shinyWidgets)
library(shiny)


shinyApp(
  ui = fluidPage(
    pickerInput(
      inputId = "sort",
      label = "sort",
      choices = c("a", "b", "c", "d"),
      multiple = TRUE,
      options = list("tick-icon" = "glyphicon glyphicon-ok-sign")
    ),
    pickerInput(
      inputId = "ok",
      label = "ok",
      choices = c("a", "b", "c", "d"),
      multiple = TRUE,
      options = list("tick-icon" = "glyphicon glyphicon-ok-sign")
    )
  ),
  server = function(input, output) {
    NULL
  }
)
user438383
  • 5,716
  • 8
  • 28
  • 43