Problem with updateSelectizeInput with "server = TRUE"

544 views
Skip to first unread message

msquatrito

unread,
Jul 29, 2014, 8:56:30 AM7/29/14
to shiny-...@googlegroups.com, msqua...@cnio.es
Hi all,

I'm having an issue with the updateSelectizeInput function when I include the argument "server = TRUE". It looks like that when I type in something in the box, it does not find any match with the choice that are available.
If you remove the "server = TRUE", it works ok. The strange thing (sorry, I'm a newbie) is that last week the "server = TRUE" was working fine in my app, when I deployed it on shinyapps. I've tried to update to the latest versions of R and shiny and I'm still having the issue.

Here is an example of the code to reproduce the problem (I copied the session info at the end of the message):

# ui.R
library (shiny)
shinyUI(
  fluidPage(
    sidebarLayout(
      sidebarPanel(
        selectizeInput("gene", h4("Gene"), choices = c("Enter gene, eg: EGFR" = ""))
      ),
      mainPanel(
        verbatimTextOutput('text')
      )
    )
  )
)


# server.R
gene_names <- c("a","b","c","d","e","f","g")

shinyServer(function(input, output, session) {   
    updateSelectizeInput(session, "gene",  choices = gene_names, server = TRUE)
    output$text <- renderText({ paste("gene", input$gene)
    })
})


Any help would be greatly appreciated!!
Best,
Massimo

#######################
sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shiny_0.10.1.9000

loaded via a namespace (and not attached):
[1] digest_0.6.4    htmltools_0.2.4 httpuv_1.3.0    Rcpp_0.11.2     RJSONIO_1.2-0.2 tools_3.1.1     xtable_1.7-3 

msquatrito

unread,
Jul 30, 2014, 8:08:42 AM7/30/14
to shiny-...@googlegroups.com, msqua...@cnio.es
I've noticed the same issue in one of the example of the shiny gallery:

Yihui Xie

unread,
Aug 2, 2014, 12:08:48 AM8/2/14
to msquatrito, shiny-discuss, msqua...@cnio.es
Sorry, it is a known bug that we have just fixed
(https://github.com/rstudio/shiny/issues/557). Please help us test it
if you can:

devtools::install_github('rstudio/shiny')

Thanks!

Regards,
Yihui

msquatrito

unread,
Aug 4, 2014, 4:47:17 AM8/4/14
to shiny-...@googlegroups.com, squa...@gmail.com, msqua...@cnio.es
Thanks Yihui! After the update it's working fine again.
Best
Massimo
Reply all
Reply to author
Forward
0 new messages