1.7.0 - null error when filtering, and object retrieval creates a new datatable within a datatable
1.7.0 - null error when filtering, and object retrieval creates a new datatable within a datatable
Hello,
First of all - fantastic product, have been using it for a little while now and love it!
I've just upgraded to the latest version the other day (1.7.0) and noticed a small thing;
When i'm filtering the rows on the table using the fnFilter call, i'm getting the following error;
Uncaught TypeError: Cannot read property 'oFeatures' of null (jquery.datatables.min.js, line 110)
Not quite sure what that means - it only seems to spring up when I have multiple datatables on the one page.
I have both a select (dropdown) box the standard input textbox in the .dataTable_filter div tag and am calling fnFilter when the dropdown box is changed (if it helps).
Also - when I try to retrieve the datatables object via $('#abc .dt').dataTable(); it works when there is only datatable on the page, although when there are a few it just seems to create a new datatable within another datatable... very strange stuff!
Any idea on how I might be able to get around this or fix it?
First of all - fantastic product, have been using it for a little while now and love it!
I've just upgraded to the latest version the other day (1.7.0) and noticed a small thing;
When i'm filtering the rows on the table using the fnFilter call, i'm getting the following error;
Uncaught TypeError: Cannot read property 'oFeatures' of null (jquery.datatables.min.js, line 110)
Not quite sure what that means - it only seems to spring up when I have multiple datatables on the one page.
I have both a select (dropdown) box the standard input textbox in the .dataTable_filter div tag and am calling fnFilter when the dropdown box is changed (if it helps).
Also - when I try to retrieve the datatables object via $('#abc .dt').dataTable(); it works when there is only datatable on the page, although when there are a few it just seems to create a new datatable within another datatable... very strange stuff!
Any idea on how I might be able to get around this or fix it?
This discussion has been closed.
Replies
Can you post a link to an example where this is happening please? I've not been able to reproduce these issues myself.
Thanks,
Allan
I'll get a link for the other scenario in a few hours - only seems to happen in combination with an AJAX/server-side data source!
I may know (but not 100% certain) what is going on with the object retriveal. It looks like your HTML isn't actually valid, as you have three tables with the same ID - which is confusing DataTables. An id assigned to an element must be unique through out the document, but here there are three 'list' elements. I'd suggest trying to fix this as the first port of call, and hopefully things will fall into place thereafter.
Nice table design btw :-)
Regards,
Allan
You have actually given me an idea on an implementation with my project. I particualliarly like the Choose an Action select box. I currently have 3-4 different pages to do what you are doing with the select box. I am going to try and come up with something like that as well.
One question, is that jquery-ui theme? If so, which one?
Good desing though.
Thanks heaps - you were spot in with the table ID's being the same... now fixed, and haven't had any issues with the null value since either. Will keep you posted if I can reproduce it at some stage later on :)
Thanks for the comments - for anyone that's interested, I got the theme from www.themeforest.com (in the site templates -> admin section). The layout for the table is still a bit of a work-in-progress, tho i'd have to say DataTables has made it sooo much better (and easier on my part too)!!
I'm using jQuery UI although only for stuff like dates and that kinda thing - the actual content-boxes are part of the theme itself rather than coming from jquery UI.