diff --git a/js/buttons.bootstrap4.js b/js/buttons.bootstrap4.js index f2dedd9b..8500c45b 100644 --- a/js/buttons.bootstrap4.js +++ b/js/buttons.bootstrap4.js @@ -53,6 +53,11 @@ $.extend( true, DataTable.Buttons.defaults, { disabled: 'disabled' } } + }, + buttonCreated: function ( config, button ) { + return config.buttons ? + $('
').append(button) : + button; } } ); diff --git a/js/dataTables.buttons.js b/js/dataTables.buttons.js index 9d77e472..ed2dd739 100644 --- a/js/dataTables.buttons.js +++ b/js/dataTables.buttons.js @@ -641,6 +641,13 @@ $.extend( Buttons.prototype, { this._addKey( config ); + // Style integration callback for DOM manipulation + // Note that this is _not_ documented. It is currently + // for style integration only + if( this.c.buttonCreated ) { + inserter = this.c.buttonCreated( config, inserter ); + } + return { conf: config, node: button.get(0),