Prevent extra API request after searching for transfer location
What does this MR do and why?
Related to #384966 (comment 1200823662)
Currently, when transferring a group, if you search and then select a group it will clear the dropdown and perform an API request to get all of the groups again. In most cases this causes one extra API request because most users probably don't open the dropdown again. It is also causing a flakey test due to a race condition. See #384966 (comment 1200823662) for an explanation.
This MR updates the logic so the groups are not fetched again until the user opens the dropdown again
Screenshots or screen recordings
Before | After |
---|---|
Screen_Recording_2022-12-08_at_1.03.14_PM | Screen_Recording_2022-12-12_at_11.45.41_PM |
How to set up and validate locally
- Navigate to a group
- Navigate to
Settings
->Advanced
->Transfer group
- Open the dropdown and search
- Choose an item
- Open the dropdown again
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Peter Hegman