Show/hide columns button, the list mixes up with the values in the table underneath, and I cannot make the list disappear by clicking the button again or clicking anywhere else in the page (the example in the datatables page behaves correctly).
I've already seen a case like this one here (http://stackoverflow.com/questions/24629902/r-shiny-datatables-colvis-behavior). In that post they mention that shiny atm is not compatible with the current data.table version, and I'd like to know if there's any other solution around. Here's my code:
ui.R
library(shiny)
library(ggplot2)
addResourcePath('datatables','\\Users\\Ser\\Downloads\\DataTables-1.10.7\\DataTables-1.10.7\\media')addResourcePath('tabletools','\\Users\\Ser\\Downloads\\TableTools-2.2.4\\TableTools-2.2.4')
shinyUI(fluidPage(
#App title titlePanel(h1("List Manager")), sidebarLayout( sidebarPanel( #File Upload Manager fileInput('file1', 'Choose file to upload'), tagList( singleton(tags$head(tags$script(src='//cdnjs.cloudflare.com/ajax/libs/datatables/1.10.7/js/jquery.dataTables.min.js',type='text/javascript'))), singleton(tags$head(tags$script(src='//cdnjs.cloudflare.com/ajax/libs/datatables-tabletools/2.1.5/js/TableTools.min.js',type='text/javascript'))), singleton(tags$head(tags$script(src='//cdnjs.cloudflare.com/ajax/libs/datatables-tabletools/2.1.5/js/ZeroClipboard.min.js',type='text/javascript'))), singleton(tags$head(tags$link(href='//cdnjs.cloudflare.com/ajax/libs/datatables-tabletools/2.1.5/css/TableTools.min.css',rel='stylesheet',type='text/css'))), singleton(tags$head(tags$script(src='//cdn.datatables.net/colvis/1.1.0/js/dataTables.colVis.min.js',type='text/javascript'))), singleton(tags$script(HTML("if (window.innerHeight < 400) alert('Screen too small');"))) )), mainPanel( dataTableOutput("mytable")) )))
server.R
shinyServer(function(input, output) { output$mytable = renderDataTable({ inFile <- input$file1 if (is.null(inFile)) return(NULL) read.table(inFile$datapath, header=TRUE, sep='') }, options = list( "dom" = 'TC<"clear">lfrtip', "colVis" = list( "activate"="click", "align"="right"), "oTableTools" = list( "aButtons" = list( "copy", "print", list("sExtends" = "collection", "sButtonText" = "Save", "aButtons" = c("csv","xls") ) ) ) ) )})Also I have another "easy" question, I think :) I'd like to search "<" ir ">" values in the searchboxes at the bottom of the table, but I can't make it work. I don't know if I have to add anything to the code so it can be done (such as "regexp" or similar).
Thanks in advanced to everyone!!