ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

bsTypeAhead fails on apostrophe in choices #3

Closed ThomasSiegmund closed 10 years ago

ThomasSiegmund commented 10 years ago

Surprisingly bsNavbarTypeAhead works. Tested shiny and shinyBS from Github as of today.

library(shiny)
library(shinyBS)
runApp(
  list(
    ui = bootstrapPage(
      uiOutput("bsTypeAhead"),
      textOutput("typeAheadOutput"),
      uiOutput("bsNavTypeAhead"),
      textOutput("navTypeAheadOutput")

        ),
    server = function(input, output, session) {

      output$bsTypeAhead <- renderUI({
        bsTypeAhead(inputId = "typeAhead", label = "TypAhead brocken", choices = c("O’Toole", "O'Hara"))    
      })
       output$typeAheadOutput <- renderText(input$typeAhead);

      output$bsNavTypeAhead <- renderUI({
        bsNavTypeAhead(inputId = "navtypeAhead", label = "NavTypAhead works", choices = c("O’Toole", "O'Hara"))    
      })
      output$navTypeAheadOutput <- renderText(input$navtypeAhead);
    }

    )
  )
ebailey78 commented 10 years ago

That is interesting... I'm working on v0.30 and I did change the way the typeahead is initiated. Your example works in the new version so I am going to assume that that fixed it.... I hope to have it released to CRAN within a couple of weeks.Thanks!

ThomasSiegmund commented 10 years ago

Cool, thanks a lot!

I've got another one for you, will submit in a minute.

Best regards

Thomas