Skip to content

Fix @ autocomplete when search requests overlap

What does this MR do and why?

With backend filtering, we should not prevent new requests from being triggered when a user types a character and the previous request is still pending. Instead, we abort the previous request and trigger a new one with the new search term.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Here's a recording of the buggy behavior:

Screen_Recording_2024-05-23_at_8.27.03_AM

I typed "ani" but the request with "an" was still loading so there wasn't any request with "ani".

How to set up and validate locally

Use the @ autocomplete and type fairly fast so that search requests overlap. Though not too fast that it's faster than our 250ms debounce. The bug is fairly easy to trigger after a few attempts.

Edited by Heinrich Lee Yu

Merge request reports