Client side filtering, with serverside processing active?

Client side filtering, with serverside processing active?

MindzMindz Posts: 10Questions: 3Answers: 0

I have a scenario where i want to do some filtering on the rows displaying in the datatable. This filtering is applied to all columns and rows displayed, and datatables provides this functionality flawlessly through the API. However, my scenario requires that i only do this filtering on data shown, since i have server side processing for the table, any interaction with the table will result on a new request to the server. The reason for this unusual scenario, is that applying my filtering, lets say, $filter= field1 = 'Some string' && (field2 LIKE '%blabla%' && field3....N LIKE '%blabla%') will kill the DB. Is it possible to apply the search API on data displayed without making a new request? Ofc, the rest interactions like sorting, pagination, etc are still server side.

Best regards,
Hugo

Answers

  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67

    Adding throttle / debounce to your filtering will spare on your db life.see an example of such functionality on the fifth column in my yadcf plugin showcase

    http://yadcf-showcase.appspot.com/server_side_source.html

    you can something similar with datatables too

  • MindzMindz Posts: 10Questions: 3Answers: 0

    Its not a question of throttle / debounce, the problem is the db model and the amount of information stored. I'd like to avoid adding more external dependencies in the project. Ty for the feedback!

This discussion has been closed.