2

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)

Philipp Schulz
  • 131
  • 1
  • 8

1 Answers1

1

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)
TimTeaFan
  • 17,549
  • 4
  • 18
  • 39