Project Dependency List - Component filter list shows duplicate entries
Summary
When querying for components, if the component appears in the project more than once then it will appear multiple times in the dropdown. The result set after submitting the search is correct. See the screenshot below:
Steps to reproduce
- Go to: https://gitlab.com/gitlab-org/gitlab/-/dependencies
- Search for "axios"
- See "axios" appear twice.
What is the current bug behavior?
Component names can appear multiple times in the dropdown.
What is the expected correct behavior?
Component names should only appear once in the dropdown.
Possible fixes
The project finder doesn't do any uniqueness checking. Can we add a unique on this?
Implementation Plan
-
frontend As only the component
nameis used by the frontend, we can effectively de-dupe the API results onnamebefore rendering the list of components in the filtered search component.
Edited by Neil McCorrison
