How to add custom button in R Shiny datatable?

There is an option to add a custom button on 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

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


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