input filters disappeared after upgrade form 1.7 to 1.9

input filters disappeared after upgrade form 1.7 to 1.9

ifaceiface Posts: 23Questions: 8Answers: 0
edited February 2012 in DataTables 1.9
Hello I've been using dataTables 1.7 with filter inputs on top of each column. (markup below) I've been very happy with the grid, it works perfect using the dataTables 1.7.

When I upgraded to the new 1.9. The input filters are no longer getting added to the control. Everything else (column titles, sorting, pagination...) appears to be working fine.

Can anyone point me in the right direction?




This is the foundation markup. The data source is an array with the columns defined in the aoColumndefs.



'+


...




...

Replies

  • ifaceiface Posts: 23Questions: 8Answers: 0
    Opps.. Here is the real html I'm using.

    [code]





    ...




    ...



    [/code]
  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    > When I upgraded to the new 1.9. The input filters are no longer getting added to the control. Everything else (column titles, sorting, pagination...) appears to be working fine.

    How are you adding the filtering controls? There must be a little bit of code which is doing that I presume?

    Allan
  • ifaceiface Posts: 23Questions: 8Answers: 0
    hey Alan,

    The filters input elements are part of the foundation HTML. I'm only delegating the keyup event to this function. (below)

    The strange thing is if I look at the table in firebug the TR with the TDs is there. But the inputs have been removed.

    [code]
    _filterColumnData : function(e) {
    var $el = $(e.target);
    this.dataTable.fnFilter( $el.val(), $el.closest('td').index());
    }
    [/code]
  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    edited February 2012
    Hmmm - sounds odd! Can you give me a link?

    Have you read the 1.8 upgrade notes ( http://datatables.net/upgrade/1.8 )? There is an option ( bSortCellsTop ) that I suspect will be relevant, but I'm struggling a little to get the picture of exactly what is happening and why.

    Allan
  • ifaceiface Posts: 23Questions: 8Answers: 0
    Hello Allan

    Thanks for the link to the 1.8 upgrade notes. I didn't find them before. They contained the answer to my issues. Setting bSortCellsTop corrected my problem.

    "bSortCellsTop": true
  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    I'll update the downloads section of the site at some point to make this kind of links for the versions more obvious and permanent! Thanks for the feedback :-)

    Allan
This discussion has been closed.