Skip to content

Conversation

@zeigotaro
Copy link

…lterComplete

Server-side issue, difficult to set up test page using publicly
available sAjaxSource that handles DataTables-specific parameters

…lterComplete Server-side issue, difficult to set up test page using publicly available sAjaxSource that handles DataTables-specific parameters
@DataTables
Copy link
Collaborator

Could you clarify what issue this change fixes please?

Using this example if I open the console and enter:

$('#example').DataTable().column(0).search('Airi').draw() 

It correctly reduces to a single row. Then:

$('#example').DataTable().column(0).search('').draw() 

correctly removes the filter.

@zeigotaro
Copy link
Author

I'm running into an issue where, with aoColumnDefs set, settings.oPreviousSearch does not have the sSearch field set correctly. Changing that call to _fnFilterComplete to match the call used for _api_register( 'search()'...) (the function above) fixes the issue I'm seeing.

@DataTables
Copy link
Collaborator

Are you able to modify this server-side processing example to demonstrate the issue please. I don't see why defining columnDefs would make any difference to the column search API.

@zeigotaro
Copy link
Author

Thank you for setting that example up. I've modified it, but the behavior I'm seeing on the JSBin is different than what I'm encountering (I'm using a JsonResult created with the DataTablesParser in the DataTablesDotNet library). I can workaround on my end by uncommenting that "oSettings.oPreviousSearch.sSearch" assignment. If you do not feel this is a productive fix, feel free to close. Thanks for your help. :-)

@DataTables
Copy link
Collaborator

Have you got a link to the DataTablesDotNet library? I wonder if it is a bug there.

I'd like to take the fix, but before I do I need to understand what the bug is :-).

@zeigotaro
Copy link
Author

https://github.com/timhobbs/DataTablesDotNet is where that library is located. Thanks!

@DataTables
Copy link
Collaborator

Great thanks. I'll try to take a look before the 1.10.8 release drops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants