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
on my page, and a script then loads the rest of the table in on page load. So far, so good.
The problem I'm having is that as soon as the DOMReady event happens, sorttable.init() is triggered. Now, because the table tag above is empty, I get a js error: 'Argument 1 of Node.appendChild is not an object'. The error is coming from the following line in makeSortable():
the.appendChild(table.rows[0]);
Presumably, that's because there are no rows. The error isn't blocking or causing any problems, but as I found it I thought I should add it here.
The text was updated successfully, but these errors were encountered:
Sorttable ought to handle this situation better, I agree, so I'll leave this open, but as a workaround I'd suggest not applying class="sortable" until you first load data into the table, and then calling sorttable.makeSortable() after that.
Thanks, I'll give that a go. At the moment, I'm triggering an event when the table content has loaded, then calling makeSortable() within the event callback. I'll add the class in that same callback now, just to get rid of the error.
Hi, this is a very minor issue indeed. I have empty table tags like this
on my page, and a script then loads the rest of the table in on page load. So far, so good.
The problem I'm having is that as soon as the DOMReady event happens, sorttable.init() is triggered. Now, because the table tag above is empty, I get a js error: 'Argument 1 of Node.appendChild is not an object'. The error is coming from the following line in makeSortable():
Presumably, that's because there are no rows. The error isn't blocking or causing any problems, but as I found it I thought I should add it here.
The text was updated successfully, but these errors were encountered: