[Docs] oSearch: description and code example are incorrect

[Docs] oSearch: description and code example are incorrect

dharknessdharkness Posts: 8Questions: 0Answers: 0
edited January 2010 in Bug reports
The description says it affects the sorting state at initialization (copy-n-paste no doubt).

The code example omits the "oSearch": { ... } wrapper object. It should be
[code]
$(document).ready( function() {
$('#example').dataTable( {
"oSearch": {"sSearch": "Initial search"}
} );
} )
[/code]
Did this used to be a non-object "sSearch" option to which you added the "bEscapeRegex" option? I tried using the code sample as-is, but that had no effect (no error though).

Replies

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Hi dharkness,

    Awesome - thanks for picking that up. I've corrected the documentation now.

    You are quite correct in your assumption as well. sSearch was the parameter that was used in DataTables 1.3 (possibly early 1.4 as well) - http://www.sprymedia.co.uk/article/DataTables - for searching. Then when I added the regex option I made it into an object. Your other point about using sSearch producing no error - DataTables will silently ignore parameters it doesn't know anything about. Should I ever get around to doing a debug version of DataTables, then that would be picked up there.

    Regards,
    Allan
This discussion has been closed.