colvis (1.1.0 dev) + fixedheader (2.1.0 dev) : event triggering

colvis (1.1.0 dev) + fixedheader (2.1.0 dev) : event triggering

ddegeyddegey Posts: 1Questions: 0Answers: 0
edited May 2013 in Plug-ins
Hello,
First of all, thanks for datables and all the plugins... really great job.

I've just updated my code to use the dev version of these 2 plugins.
I see that fixedHeader catch the column-reorder event and the column-visibility.

But there is no trigger in colVis... so i add it.

I've edited ColVis.js Version: 1.1.0-dev on line 513 (_fnDrawCallback function) and add these lines
[code]
/* Fire an event so other plug-ins can update */
$(this.s.dt.nTable).trigger( 'column-visibility');
[/code]

I'm not a gourou, so correct me if i'm wrong.
Hope this is the right thing to do.

++
John

Replies

  • allanallan Posts: 61,740Questions: 1Answers: 10,111 Site admin
    DataTables 1.10's column visibility function will fire that event (it does in git already) - ColVis itself should fire the event, since it is just calling into the DataTables API. It sounds like FixedHeader with column visibility will need v1.10 - I was planning to release both at the same time anyway.

    Allan
This discussion has been closed.