I am using renderDataTable
in R & Shiny to present my data, but the filter is positioned at the bottom of table. Is there any way to put it at the top of the table? Thanks in advance!
BTW, where can I find the option list of renderDataTable
?
mainPanel(
tabsetPanel(
tabPanel("Table",tableOutput("values")),
tabPanel("Tree Plot",plotOutput("plot")),
tabPanel("Segment Data",dataTableOutput("obs"))
I'm not familiar with CSS, can anyone give me some advice on how to edit CSS inside R function?
DT: A Wrapper of the JavaScript Library 'DataTables' Data objects in R can be rendered as HTML tables using the JavaScript library 'DataTables' (typically via R Markdown or Shiny). The 'DataTables' library has been included in this R package.
Another option is to modify the CSS. with this line
tags$head(tags$style("tfoot {display: table-header-group;}"))
You put this into your ui.R file like this
,tabPanel("MeSH" ,tags$head(tags$style("tfoot {display: table-header-group;}"))
,fluidRow( ...
This : How to place DataTables column filter on top : can help you with the CSS you'll need to modify to get the filter at the top.
You can look here : https://github.com/rstudio/shiny-examples/blob/master/012-datatables/server.R : for how to use the renderDataTable
options and you should be able to see the correlation between the way those options are set and the options list for the jQuery DataTables proper.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With