Skip to content

Commit 20cc8b6

Browse files
committed
proper deinitialization
1 parent 8ef1abd commit 20cc8b6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dataTables.rowsGroup.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class RowsGroup {
6868
this.mergeCellsNeeded = false; // merge after init
6969
this.order = [];
7070

71-
dt.on('order.dt', () => {
71+
dt.on('order.dt.rowsGroup', () => {
7272
if (!this.orderOverrideNow) {
7373
this.orderOverrideNow = true;
7474
this._updateOrderAndDraw();
@@ -77,32 +77,32 @@ class RowsGroup {
7777
}
7878
});
7979

80-
dt.on('preDraw.dt', () => {
80+
dt.on('preDraw.dt.rowsGroup', () => {
8181
if (this.mergeCellsNeeded) {
8282
this.mergeCellsNeeded = false;
8383
this._mergeCells();
8484
}
8585
});
8686

87-
dt.on('column-visibility.dt', () => {
87+
dt.on('column-visibility.dt.rowsGroup', () => {
8888
this.mergeCellsNeeded = true;
8989
});
9090

91-
dt.on('search.dt', () => {
91+
dt.on('search.dt.rowsGroup', () => {
9292
// This might to increase the time to redraw while searching on tables
9393
// with huge shown columns
9494
this.mergeCellsNeeded = true;
9595
});
9696

97-
dt.on('page.dt', () => {
97+
dt.on('page.dt.rowsGroup', () => {
9898
this.mergeCellsNeeded = true;
9999
});
100100

101-
dt.on('length.dt', () => {
101+
dt.on('length.dt.rowsGroup', () => {
102102
this.mergeCellsNeeded = true;
103103
});
104104

105-
dt.on('xhr.dt', () => {
105+
dt.on('xhr.dt.rowsGroup', () => {
106106
this.mergeCellsNeeded = true;
107107
});
108108

@@ -231,7 +231,7 @@ if ($.fn.DataTable) $.fn.DataTable.RowsGroup = RowsGroup;
231231
/* eslint-enable no-param-reassign */
232232

233233
// Automatic initialisation listener
234-
$(document).on('init.dt', (e, settings) => {
234+
$(document).on('init.dt.rowsGroup', (e, settings) => {
235235
if (e.namespace !== 'dt') {
236236
return;
237237
}

0 commit comments

Comments
 (0)