sSearch gets cleared after init?

sSearch gets cleared after init?

jedjed Posts: 2Questions: 0Answers: 0
edited January 2011 in General
Greetings, and thank you for this amazing plug-in!

I am trying to access the original value of sSearch after a table is initialized and the filter field value is cleared. After init it is empty both in my original options object and in fnSettings, even though it is not empty at compile time (and otherwise works predictably).

Here is relevant code:

[code]
options: {
'oSearch' : { 'sSearch' : 'incomplete' }
}

$('#table').dataTable(options); // table successfully auto-filters with 'incomplete'

...

var oTable = $('#table').dataTable();

console.log(options) // => oSearch.sSearch : ""
console.log(oTable.fnSettings()) // => oInit.oSearch.sSearch : ""
[/code]

I can store this initial value elsewhere, but it would be nice to be able to access the original options object, unmodified. Anyone have thoughts on this?

Many thanks!
This discussion has been closed.