JQueryUI and ColVis
JQueryUI and ColVis
The example at http://www.datatables.net/release-datatables/extensions/ColVis/examples/jqueryui.html does not seem to render correctly. The show/hide columns does not hide and has a transparent background. I'm sure you are aware of this, but just wondering if there is a timescale for looking at this?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Actually, I just committed a fix for this yesterday.
The example will be updated on the next ColVis release, but the fix is to just use the
jQueryUI
option in DataTables at the moment (it is deprecated in 1.10, and will be removed in 1.11, but ColVis isn't capable of working with jQuery UI without that parameter yet).Regards,
Allan
Thanks.
Any timescales on the next release of ColVis? I know how all consuming this project must be and I'm guessing it'll be a case of it'll be released when you get round to it!
Appreciating your efforts :)
Having implemented the above, it seems there is still an issue with the Column Selector not hiding. The Show/hide columns is rendered with JQueryUI styles, and the checkboxes appear when clicked, but do not dissapear when clicked again.
Mainly it is a case of a release will occur where there are enough bug fixes, or an important / big enough feature is added to warrant a release.
At the moment there has only been once fix to ColVis core since v1.1.1 (which was for defaults being set with camelCase notation). The fix here is to the example and didn't require any change in ColVis core, so that wouldn't cause a release itself.
Is that not the default behaviour of ColVis you are seeing (example)? The list isn't removed when a single column is toggled - you need to click outside of the list.
Allan
Clicking outside does not close the list. Doesn't work on this page either http://datatables.net/release-datatables/extensions/ColVis/examples/jqueryui.html
Right enough - that's a bug. I'll try to look into it tomorrow.
Allan
Brilliant, thanks. Just keen to use ColVis on my app rewrite rather than the ColVis predecessor you helped me create a couple of years ago, that is quite inelegant in comparison!
Hah - how time flies!
Fix now committed. If you grab the latest CSS from the repo it should work as expected.
Allan
All working and looking really good. Thanks!
One further question if I may.... how do you change the button text using the API? It hints that you can on this page : https://datatables.net/extensions/colvis/api but the example doesn't seem to include buttonText. I've tried a few guesses without luck.
You can't change the button text via the API at the moment - it can only be done at initialisation time. That is done with the
buttonText
option.Allan
Can you mix and match these two systems? I'm using the API to add ColVis to the datatable. If I include the following :
My datatable still shows the default button text and the column I want to exlude is not excluded.
If you are using the
new
constructor method to create the ColVis instance, then no, ColVis will not read the options from the DataTables settings object, but you can use all of the same options by passing them in as the second option to the ColVis constructor:I'll clarify that in the documentation.
Allan
Brilliant, all working thanks. Sorry if I've distracted you from more pressing development over the last week!
No - its good to get this stuff sorted. I'd rather the software that shipped was as bug free as possible! I very much appreciate your feedback!
Allan