joeharrison714 / MVCGrid.Net

http://mvcgrid.net
MIT License
75 stars 56 forks source link

Abort previous table reload on subsequent reload call #137

Open zacherkkila opened 6 years ago

zacherkkila commented 6 years ago

Issue: Long running searches can cause reload requests to stack up if typing quickly, often causing an issue where the results of the reload do not match the search. It seems to be that if the first request has not finished, the second will be ignored all together. I was able to see this very consistently on a table with 25k records

Solution: Keep a reference to the previous ajax request and call abort() upon the next request. This will abort the previous request if it is still running allowing only the latest reload to return