Skip to content

Commit

Permalink
Fix: Bootstrap 4 styling - when a collection button was used other th…
Browse files Browse the repository at this point in the history
…an the right most button, its styling would be off, due to corner radius being used.

- DD-646
- https://datatables.net/forums/discussion/comment/140218#Comment_140218
  • Loading branch information
AllanJard committed Mar 5, 2019
1 parent d41b341 commit 79213df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/buttons.bootstrap4.js
Expand Up @@ -53,6 +53,11 @@ $.extend( true, DataTable.Buttons.defaults, {
disabled: 'disabled'
}
}
},
buttonCreated: function ( config, button ) {
return config.buttons ?
$('<div class="btn-group"/>').append(button) :
button;
}
} );

Expand Down
7 changes: 7 additions & 0 deletions js/dataTables.buttons.js
Expand Up @@ -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),
Expand Down

0 comments on commit 79213df

Please sign in to comment.