ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

Table dissappears when I try change color by using highlightCells() #11

Closed zartek closed 9 years ago

zartek commented 9 years ago

When I try to use function highlightCells() table dissappears. Other people seems to have similar problems: https://groups.google.com/forum/#!msg/shiny-discuss/PvlrXLEo0z8/uQDUdFdviKMJ Example code:

library(shinyBS) runApp(

list(ui = bootstrapPage(pageWithSidebar( headerPanel("Data frame with colors"), sidebarPanel(), mainPanel( tableOutput("my_dataframe") ) ) ) , server = function(input, output, session) {

output$my_dataframe <- renderTable({ 
  data.frame("Brand ID"=1:4,"Client1"=c("red", "green", "green", "green"),
             "Client2"=c("green", "red", "green", "red")) 
    highlightCells(session, 'my_dataframe', class="error", regex = "red")

})

} ) )