I have a DT::datatable with Buttons extensions (for controling which columns are visible by user) in shiny app.
Is there a way how to get vector of actually visible columns?
thank you. I know this page and went through it before asking the question here. It is definitely possible that I missed it but I just dont see it there (I know how to get vector of visible rows but not columns). Could you be more specific?
YOu can try to refer to below sample.
trn %>% DT::datatable(caption = "Transaction Table", escape = FALSE, filter = 'top', rownames = FALSE, extensions = list('ColReorder' = NULL, 'RowReorder' = NULL, 'Buttons' = NULL, 'Responsive' = NULL), options = list(dom = 'BRrltpi', scrollX = TRUE, #autoWidth = TRUE, lengthMenu = list(c(10, 50, 100, -1), c('10', '50', '100', 'All')), ColReorder = TRUE, rowReorder = TRUE, buttons = list('copy', 'print', list(extend = 'collection', buttons = c('csv', 'excel', 'pdf'), text = 'Download'), I('colvis'))))