Don't overflow project/group dropdown results
What does this MR do?
Fixes the overflow issue in the group and project dropdowns.
Are there points in the code the reviewer needs to double check?
Does this work locally for someone with merging powers?
Especially useful since I'm having issues taking screenshots on my machine for some reason.
Why was this MR needed?
The UI gets pretty bad when there are a lot of matches, as illustrated in #49382 (closed).
What are the relevant issue numbers?
Closes #49382 (closed)
Closes #49379 (closed)