Skip to content

Commit

Permalink
Fix: JS error when there are no fill options available
Browse files Browse the repository at this point in the history
Fix: Vertical fill not available when it was the only fill type available (other's having been deleted) and a single column was used

- https://datatables.net/forums/discussion/58669
  • Loading branch information
AllanJard committed Oct 21, 2019
1 parent bc44379 commit 91d97e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/dataTables.autoFill.js
Expand Up @@ -294,7 +294,7 @@ $.extend( AutoFill.prototype, {
var result = actions[ available[0] ].execute( dt, cells );
this._update( result, cells );
}
else {
else if ( available.length > 1 ) {
// Multiple actions available - ask the end user what they want to do
var list = this.dom.list.children('ul').empty();

Expand Down Expand Up @@ -1061,7 +1061,7 @@ AutoFill.actions = {

fillVertical: {
available: function ( dt, cells ) {
return cells.length > 1 && cells[0].length > 1;
return cells.length > 1;
},

option: function ( dt, cells ) {
Expand Down

0 comments on commit 91d97e7

Please sign in to comment.