how to use scrollx in shiny DT (renderDataTable)

3k views Asked by At

I want use scrollx options in shiny DataTable since there are many field.
(refer : https://datatables.net/examples/basic_init/scroll_x.html)

How can i use? I cant'n find any examples.

1

There are 1 answers

0
Rokmc1050 On

I found! in mainPanel unable work in Shiny Dashboard

Just add options list like bellow

output$actCam <- renderDataTable({
        datatable(summaryDay[campaignid %in% act_idx,], 
                  options = list(scrollX=TRUE, scrollCollapse=TRUE))
    })