Skip to content

Update handling of hasFetched as loading state for Filtered Search Bar tokens

What does this MR do and why?

Introduce and use hasFetched as the loading state tracker. To allow the page to know that loading has both started and finished, introduce the hasFetched parameter. This should be false by default, and be set to the opposite of the suggestionsLoading value as the fetching of data calls are made. The use of this parameter will allow both the loading wheel to appear and disappear correctly and for the subsequent text displays to work.

This is a merge request split off from !180396 (Suggested in !209513 (comment 2864313875) )

References

Screenshots or screen recordings

Before After
20251107-1321-42.5911155.mp4 20251107-1327-41.2950691.mp4

How to set up and validate locally

  1. Visit the To-Do List page /dashboard/todos
  2. Create a filter, like Group or Project , and see that the suggestions drop-down sits empty for a brief second before the loading wheel is made visible.
  3. Checkout this branch
  4. Refresh the page and see that the selection of the same filter in the search bar does not show empty, but the loading wheel is available from the appearance of the suggestions drop-down

MR acceptance checklist

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

Edited by Joe Snyder

Merge request reports

Loading