wso2 / carbon-device-mgt

Apache License 2.0
53 stars 113 forks source link

Add a delay for data tables server side paging #1241

Closed madawas closed 6 years ago

madawas commented 6 years ago

Purpose

DataTables library instantiates an ajax request for each key release when searching/filtering. in a system with a larger dataset, many requests are made to the back end for a longer keyword search which is a huge overload.

Also, sometimes since the request initialized for the first character returns the largest subset of data (if available) this request may take a longer time to process. Since DataTables update the table in the order that the response comes, the final result shown would be the last response received which can be incorrect.

Goals

Showing the correct data in the data tables search.

Approach

Enabling a delay before the requests made using DataTables fnSetFilteringDelay plugin.

User stories

N/A

Release note

N/A

Documentation

N/A

Training

N/A

Certification

N/A

Marketing

N/A

Automation tests

Security checks

Samples

N/A

Related PRs

N/A

Migrations (if applicable)

N/A

Test environment

JDK 1.8.0_161, Ubuntu 16.04, Chrome 64.0.3282.186, JS V8 6.4.388.46

Learning

https://datatables.net/plug-ins/api/fnSetFilteringDelay