You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the table contains an explicit <tbody></tbody> section, then sorttable handles it fine.
But in the usual case, where the <tbody> tags are omitted (because they are considered implicit) AND the table has no main rows (i.e. there are no <tr> that come after <thead> and before <tfoot>), then sorttable complains and generates JS errors.
The fix is to add the following, in makeSortable, just after the test for table.tHead == null:
//If there is no table body (no <tbody>, nor is it implicit because of a normal <tr>), then give up. Otherwise, we get errors later.
if (table.getElementsByTagName('tbody').length == 0){
//console.log ("disembodied table.");
return;
}
The text was updated successfully, but these errors were encountered:
If the table contains an explicit
<tbody></tbody>
section, then sorttable handles it fine.But in the usual case, where the
<tbody>
tags are omitted (because they are considered implicit) AND the table has no main rows (i.e. there are no<tr>
that come after<thead>
and before<tfoot>
), then sorttable complains and generates JS errors.The fix is to add the following, in makeSortable, just after the test for table.tHead == null:
The text was updated successfully, but these errors were encountered: