diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/registry/registry_search.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/registry/registry_search.vue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/registry/registry_search.vue b/app/assets/javascripts/vue_shared/components/registry/registry_search.vue index 1948a6778f4..8c9c7c63db1 100644 --- a/app/assets/javascripts/vue_shared/components/registry/registry_search.vue +++ b/app/assets/javascripts/vue_shared/components/registry/registry_search.vue @@ -1,6 +1,7 @@ <script> import { GlSorting, GlSortingItem, GlFilteredSearch } from '@gitlab/ui'; import { FILTERED_SEARCH_TERM } from '~/packages_and_registries/shared/constants'; +import { SORT_DIRECTION_UI } from '~/search/sort/constants'; const ASCENDING_ORDER = 'asc'; const DESCENDING_ORDER = 'desc'; @@ -52,6 +53,9 @@ export default { return acc; }, {}); }, + sortDirectionData() { + return this.isSortAscending ? SORT_DIRECTION_UI.asc : SORT_DIRECTION_UI.desc; + }, }, methods: { generateQueryData({ sorting = {}, filter = [] } = {}) { @@ -119,6 +123,7 @@ export default { data-testid="registry-sort-dropdown" :text="sortText" :is-ascending="isSortAscending" + :sort-direction-tool-tip="sortDirectionData.tooltip" @sortDirectionChange="onDirectionChange" > <gl-sorting-item |