Skip to content

Commit

Permalink
Fix: On destroy the added -tag colgroup wasn't being removed
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanJard committed Feb 22, 2024
1 parent dc10aba commit 6cab121
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/api/api.core.js
Expand Up @@ -142,6 +142,8 @@ _api_register( 'destroy()', function ( remove ) {
jqTable.append( tfoot );
}

settings.colgroup.remove();

settings.aaSorting = [];
settings.aaSortingFixed = [];
_fnSortingClasses( settings );
Expand Down
4 changes: 4 additions & 0 deletions test/api/core/destroy().js
Expand Up @@ -43,6 +43,10 @@ describe('core - destroy()', function() {
testElementsPresent(false);
});

it('Confirm that colgroup is removed', function() {
expect($('#example colgroup').length).toBe(0);
});

dt.html('basic');
it('Check default is false', function() {
table = $('#example').DataTable();
Expand Down

2 comments on commit 6cab121

@anasuryana
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will wait for the release

@glassum
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So nice it'll be fixed soon!

Please sign in to comment.