Enhancement Suggestion: client side search should get auto enabled even if the 'serverSide' is true

Enhancement Suggestion: client side search should get auto enabled even if the 'serverSide' is true

vinayak355vinayak355 Posts: 1Questions: 0Answers: 0

This is an edge scenario for optimization:
When we want to All the records are loaded on the client side: - Say,
1. page size is 5 for caching
2. 10 records per page
3. The result returned from the server is=> 30 records out of 30
i.g. "recordsTotal": 30, "recordsFiltered": 30,

In this scenario: All the records form the server side are on the front end...

**** In such cases, when the cached no. of records is equal to the total number of the records on server side,
Client side search should be triggered instate of server side search....

Replies

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Thanks for the suggestion. It sounds like an extension to the pipeling example - is that what you were thinking of?

    It would certainly be possible, but I think it would require a fair amount of work since you would be reimplementing the search that is already present on the server-side. I don't believe it would be possible to use DataTables' internal search since the way the pipelining works is for DT to only be given the data that it needs for the display - i.e. just how server-side processing works.

    You'd also need to take into account the paging information which will most likely change due to the filter, and that along might require an extra call to the server.

    I'm afraid that this isn't something that I'll be working on myself, but if someone else wants to take it on, I would be interested to see how it develops.

    Allan

Sign In or Register to comment.