the autocomplete lists in the food consumption form and the physical activity form makes a new request when users press a key in the input box. after getting responses to the requests, this list is filled with items. however, it is expected that the list should be filled in accordance with the latest value of the input box.
currently, each request is sent to the API server in parallel so that sometimes old requests complete later than newer requests. these unordered requests cause the autocomplete list to show old content.
To solve this issue, just before sending a new request, previous requests, if available, need to be canceled.
the autocomplete lists in the food consumption form and the physical activity form makes a new request when users press a key in the input box. after getting responses to the requests, this list is filled with items. however, it is expected that the list should be filled in accordance with the latest value of the input box.
currently, each request is sent to the API server in parallel so that sometimes old requests complete later than newer requests. these unordered requests cause the autocomplete list to show old content.
To solve this issue, just before sending a new request, previous requests, if available, need to be canceled.