Skip to content

Commit

Permalink
Fix: init event can only happen once for a table, so listen only on…
Browse files Browse the repository at this point in the history
…ce on init to prevent child tables triggering it again from their bubble event.

- Fixes DataTables/DataTables #755
  • Loading branch information
Allan Jardine committed Jan 12, 2016
1 parent 91081ba commit 311c04a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/dataTables.scroller.js
Expand Up @@ -562,7 +562,7 @@ $.extend( Scroller.prototype, {
// we can reliably do this here. We could potentially also measure on
// init complete, which would be useful for cases where the data is Ajax
// loaded and longer than a single line.
$(this.s.dt.nTable).on( 'init.dt', function () {
$(this.s.dt.nTable).one( 'init.dt', function () {
that.fnMeasure();
} );

Expand Down

0 comments on commit 311c04a

Please sign in to comment.