I would like to include the event "Restore column visibility ( link ), the code would be this below:
$(document).ready(function() {
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
{
extend: 'colvis',
postfixButtons: [ 'colvisRestore' ]
}
],
columnDefs: [
{
targets: -1,
visible: false
}
]
} );
In my code in R, could anyone tell me how?
output$dtDisp4 <- renderDataTable({
datatable(baseFullGI, extensions = 'Buttons', options = list(
dom = 'Bfrtip',
buttons = list('excel','colvis'),
searchHighlight = TRUE,
columnDefs = list(list(className = 'dt-center', targets = 0:11)),
scrollX = TRUE,
pageLength = 50
), filter = 'top',
class = 'cell-border stripe',
rownames = FALSE)
})