-
Notifications
You must be signed in to change notification settings - Fork 754
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 with empty table and pager widget #450
Comments
Hi @Patanock! That looks like it's a bug in the function addLine() {
i++;
line = $('<tr><td>'+i+'</td><td>'+i+'</td></tr>');
$('.tablesorter tbody').append(line).trigger("update");
} And just using "update" should take care of all 3 problems that you've described. Edit: Oh, and the filter row is made to hide when there is no content to filter. |
Hi @Mottie ! OMG Thanks !! It seems to work, but I can't believe that I didn't test it. I thought I tried all the combinations. About the filter, why doesn't it appear on example2 ? There's content. |
Example 2 isn't working because of the |
Oops, forgot to fix the filter row hiding... ugh |
Hi @Mottie ! I tried your demo at : http://jsfiddle.net/Mottie/abkNM/1675/ I need to add this, after update to make it work : |
Hi @Patanock! Yeah, sorry. With the holidays and going out of town I haven't had a chance to finish updates and push out the next version. Once that is done, there is already a fix in place that will solve that issue (without needing to trigger |
Hello,
Sorry if the following bug has already been reported...
I'm trying to create a table with tablesorter, pager and filter widget.
My table needs to be empty at start, then I add rows with javascript.
I made a simple test following the examples.
Example 1 : http://www.prestaplugins.com/test/tablesorter/example1.html
If you click "Add row", you can see an error is thrown :
TypeError: c.cache[tbdy] is undefined
It's the same if you create a table witch is not empty at start, then you remove all rows by clicking "Remove row" and then you try to add a new one.
Example 2 : http://www.prestaplugins.com/test/tablesorter/example2.html
So I tried something. When I create a row, if it's the first one, I restore the pager widget AFTER the first line is added.
And if I remove the last row, I destroy the pager widget.
It seems working... but there's a new issue.
If my page default size is 10 rows, then after removing all, if I add a lot, the 12th appears on the first page with all the next ones until 20, so there is more than 10 rows in my page. Then at 30th row, all rows from 12 to 30 disappears but those from 20 to 30 are displayed...
Example 3 : remove the line, then click on Add many times (more than 12).
http://www.prestaplugins.com/test/tablesorter/example3.html
I worked on this all the day trying to find a solution, I'm so tired...
You're my last hope, please HELP...
Last thing... I don't understand why the filter doesn't appears even when my table is not empty at start, like in example 2. But I didn't investigate on this...
The text was updated successfully, but these errors were encountered: