flarum / issue-archive

0 stars 0 forks source link

Support cancellation of ajax requests for search for outdated search query #26

Open luceos opened 2 years ago

luceos commented 2 years ago

Bug Report

Current Behavior

Whenever you do a search and the search query is more or equal than three characters it will dispatch an ajax request to all search sources after 250ms. By default these are two: discussions and users.

Each next mutation of the search query will add two new ajax requests. Because we do not keep track of the previously triggered ajax requests we do not cancel those.

Expected Behavior

Ajax requests for older query search should be cancelled to preserve server capacity.

Environment