Yang-Tang / shinyjqui

jQuery UI Interactions and Effects for Shiny

Home Page:https://yang-tang.github.io/shinyjqui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

updateOrderInput not working with as_source=T?

emantzo opened this issue · comments

I noticed that orderInput is not working when "as_source=T" in the orderInput:

library(shiny)

if (interactive()) {
  
  ui <- fluidPage(
    orderInput("foo", "foo",
               items = month.abb[1:3],
               item_class = 'info',
    as_source=T),
    
    verbatimTextOutput("order"),
    actionButton("update", "update")
  )
  
  server <- function(input, output, session) {
    output$order <- renderPrint({input$foo})
    observeEvent(input$update, {
      updateOrderInput(session, "foo",
                       
                       items = month.abb[1:6],
                       item_class = "success")
    })
  }
  
  shinyApp(ui, server)
  
}

Is this possible to change?

Unfortunately, all the updateInput functions of shiny, including the updateOrderInput here, can not update none-input object. When "as_source=T", the source OrderInput become a normal HTML element, so you can't update it.