How to add custom button in R Shiny datatable?

There is an option to add a custom button on datatables.net site. How it can be coded in R Shiny app? A basic R code example for one button and observer will be great to see.

Here is JS code from https://datatables.net/extensions/buttons/examples/initialisation/custom.html

$(document).ready(function() {
    $('#example').DataTable( {
        dom: 'Bfrtip',
        buttons: [
            {
                text: 'My button',
                action: function ( e, dt, node, config ) {
                    alert( 'Button activated' );
                }
            }
        ]
    } );
} );

Thanks!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.