How to file bug
How to file bug
djm
Posts: 20Questions: 4Answers: 0
How can I file a bug?
When I go to
https://datatables.net/forums/categories/bug-reports
no matter what I only have the option to set "free community support" in the drop down menu.
How do submit a bug report?
This discussion has been closed.
Replies
You can do so in the free community support forums as well. I monitor it as well. Just post it in this thread for example.
Please ensure that you include a test case with your bug report.
Allan
The problem is dynamically hiding/showing columns and synchronising this with ColVis as mentioned here:
http://datatables.net/forums/discussion/23049/how-to-get-colvis-menu-to-update-when-i-dynamically-hide-show-columns#latest
After further investigation I see that this is probably more of a misunderstanding on my part. Nonetheless here my current understanding and problem:
I created a page based on the example
http://www.datatables.net/release-datatables/extensions/ColVis/examples/simple.html
Additionally I add this button to the html
(Clicking the button should hide a column, and then opening the ColVis dialog should show the corresponding checkbox unseleced)
and this is what my js looks like:
Everything seems to work fine.
However if I instead use "var table = $('#example').DataTable();"
then the function nSetColumnVis cant be found.
If I use
then things work again but now
wont work.
http://datatables.net/manual/api
mentions the difference between dataTable() and DataTable(), but its still unclear to me in particular in light of this example.
I understood that "DataTable()" is the new recommended way to go, but that it was still analogous to using dataTable()? Why cant I get the example to work with it?
Can you please clarify the difference some more, and explain how I would get this ColVis example to work with it.
P.S
I tried to get the code snippets shown in markup (down) cleanly as described
http://datatables.net/manual/tech-notes/8
but it doesnt seem to show properly. Am I doing something wrong?
Thanks very much in advance.
Heres a jfiddle with the above code:
http://jsfiddle.net/b8xn0j12/
In terms of the options passed in they are identical. The difference is in the return value.
$().dataTable()
will return a jQuery object extended with the old API.$().DataTable()
will return the new DataTables API object.fnSetColumnVis
exists only in the old API. In the new API you would want to usecolumn().visible()
.Allan
Thank you for the reply.
So how could I get
$.fn.dataTable.ColVis.fnRebuild( table );
to work with
DataTable
?You wouldn't - the function you mention is a static function. Just call
$.fn.dataTable.ColVis.fnRebuild( table );
.There is an instance method called
fnRebuild
as well and for that you would need to access the ColVis instance, which you can do using the new method to create the ColVis instance and storing the variable as you would for any other constructor.I do need to update ColVis to add a 1.10 API extension method.
Allan
Thanks again for the reply
What I meant is what if "table" was created with "DataTable"?
Theres no way to call
$.fn.dataTable.ColVis.fnRebuild( table )
passing it as a parameter then?
So Id have to do something like
I see - this is why a test case is an important part of filing a bug :-). I've created one here: http://live.datatables.net/sorodepe/1/edit . And yes that is a bug - it should work and isn't. I'll try to take a look and fix it as soon as I can.
edit I see you do have a test case above, but the error code is commented out which is why I didn't see it before.
Allan
Thanks very much
Thank you very much
Thank you very much