Columns not sorting when using default search field

Columns not sorting when using default search field

pixelgeekpixelgeek Posts: 18Questions: 2Answers: 0
edited January 2014 in DataTables 1.9
I ran into an interesting issue recently. Viewable at http://wp.arcanewonders.com/mw/

If you filter the second table using the "Search all fields:" search field (its the default field added by DataTables) and then try to sort the results the table doesn't update. It sorts it internally but doesn't refresh the view. If you clear the field you can see it has sorted the data but just not displayed it.

Is there a way to override the display and force a refresh? Or is it a configuration issue? This is the code that I am using to init the table

[code]
listTable.dataTable({
oLanguage: { "sSearch": "Search all fields:"},
sDom: 'fptil',
sScrollY: "300px",
bPaginate:false,
aoColumnDefs: [{
aTargets:[0,1,2,3],
bSortable:true
}, {
aTargets:[4,5],
bSortable:false
}],
fnRowCallback:function(nRow) {
var tr = $(nRow)
$('td:nth-child(5)', tr).text(getCardAmount(tr))
}
})
[/code]

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    > If you filter the second table

    Possibly bad timing, but I'm not actually seeing any tables on the page you linked to. DO I need to do something to make this visible?

    Allan
  • pixelgeekpixelgeek Posts: 18Questions: 2Answers: 0
    Select "New" from the Spellbook menu and then enter a name for the Spellbook and select a Wizard. Its for a game company :-)
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Ah thanks! I was using Safari 5 (old old...) and the page just wasn't doing very much.

    So I think the problem comes from an old version of DataTables 1.10-wip. Could you try the latest DataTables from here http://datatables.net/download/build/nightly/jquery.dataTables.js ?

    Thanks,
    Allan
  • pixelgeekpixelgeek Posts: 18Questions: 2Answers: 0
    edited January 2014
    That did the trick

    Thanks
This discussion has been closed.