How to get arrow on the right side to the left in shinyWidgets pickerInput?

64 Views Asked by At

How can i get the arrow that opens the dropdown-menu from the right side to the left in shinyWidgets::pickerInput?


library(shiny)
library(shinyWidgets)


ui <- fluidPage(

  pickerInput(
    inputId = "name",
    label = "Choose option",
    choices = c("A", "B", "C"),
    options = list(
      title = "choose")
  )
)


server <- function(input, output) {}


shinyApp(ui = ui, server = server)

1

There are 1 best solutions below

0
On BEST ANSWER

Would a simple CSS tweak do the trick for you?

library(shiny)
library(shinyWidgets)


ui <- fluidPage(
  
  tags$head(
    tags$style(HTML("
  .filter-option-inner {
    padding-left: 10px;
  }
  span.bs-caret > span.caret {
    left: 10px;
  }
  "
      ))
  ),
  

  
  pickerInput(
    inputId = "name",
    label = "Choose option",
    choices = c("A", "B", "C"),
    options = list(
      title = "choose")
  )
)

server <- function(input, output) {}

shinyApp(ui = ui, server = server)