Using filtering API on a hidden datatable.. possible?
Using filtering API on a hidden datatable.. possible?
replicant
Posts: 2Questions: 0Answers: 0
I have a unique usage (at least as far as I can tell based on the lack of other folks doing something similar) of datatables to where I'm using datatables for its filtering/sorting/paging functionality, but retrieving the data and running the returned table row data into a mustache template to create a non-tabular layout of the data (basically turning the tabular data/layout into a nicely formatted list from that datatable data using fnGetData and fnGetFilteredData plugin that Allan created a while back). So in order to do this, I have a datatable on the page as well as my mustache template (using ICanHaz.js for doing this). Everything works great.. until I HIDE the container that holds the datatable.. Is it possible to interact with a datatable even when it is hidden with a simple display:none on the table element (or even on some outer parent container to the main datatable table element)?
Thanks for your help. If code samples would help, please let me know what I'd need to post.
-replicant
Thanks for your help. If code samples would help, please let me know what I'd need to post.
-replicant
This discussion has been closed.
Replies
If you could link to a test page, with instructions on how to reproduce the issue, that would be useful.
Allan
Will post up a gist or jsfiddle with errors, sample markup and js to replicate the issue.
In the meantime, here is the error I was receiving when the container that holds the table that is referenced to instantiate the datatable:
Uncaught TypeError: Cannot read property 'oFeatures' of null
It throws that when i call fnFilter on aforementioned datatable.
Like I said, I'll come back to this to discuss a real solution for this (not just hiding it via absolute positioning).
Thanks for your time Allan, you're posts and plugins have been most helpful here.