Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when number of tbody's td is diff of thead's td (getAttribute of undefined) #819

Closed
sportok opened this issue Feb 12, 2015 · 2 comments

Comments

@sportok
Copy link

sportok commented Feb 12, 2015

Hello,

Since upgrade to v2.19.0 and v2.19.1 (before i had v2.17.4) i have a problem with tablesorter.

If number of tbody's "td" is not similar to number of thead's "td", an error occured.
For example, if i want a blank row, i must be write :
$('#table_applicationCompany tbody').append('');
Before this upgrade, next code worked :
$('#table_applicationCompany tbody').append('');

It is more problematic when i have a "colspan=3" because it not possible to add the real number of td...

ERROR : "Uncaught TypeError: Cannot read property 'getAttribute' of undefined" (in jquery.tablesorter.widgets.min.js)

Have you a solution ?

Thanks,
SportOk

@Mottie
Copy link
Owner

Mottie commented Feb 12, 2015

Hi @sportok!

I would not recommend adding an empty row like that because it is evaluated as a row with all empty cells for sorting, so the emptyTo option kicks in and sorts it at the bottom (default setting).

If you want to insert and blank row and keep it in place during sorting, then use the static row widget.

That being said, that is a problem in the code which I will fix 😉

@sportok
Copy link
Author

sportok commented Feb 12, 2015

@Mottie Thank you for the fix ! :)
I'll see if I can set up the static widget but I don't think I can use it everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants