Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-04-25 15:18:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-25 15:18:56 +0300
commitd2d913b606702ecefa01f03362602fde256e3f75 (patch)
tree07643306ee63f789188a9133823aac3c92c94dfb /app/assets/javascripts/analytics
parentaf69e63b6655a450849a8fa2640ae6ce5a8db681 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/analytics')
-rw-r--r--app/assets/javascripts/analytics/cycle_analytics/components/stage_table.vue7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/analytics/cycle_analytics/components/stage_table.vue b/app/assets/javascripts/analytics/cycle_analytics/components/stage_table.vue
index 6842373fb61..1e158baa925 100644
--- a/app/assets/javascripts/analytics/cycle_analytics/components/stage_table.vue
+++ b/app/assets/javascripts/analytics/cycle_analytics/components/stage_table.vue
@@ -11,6 +11,7 @@ import {
import FormattedStageCount from '~/analytics/cycle_analytics/components/formatted_stage_count.vue';
import { __ } from '~/locale';
import Tracking from '~/tracking';
+import { scrollToElement } from '~/lib/utils/common_utils';
import {
NOT_ENOUGH_DATA_ERROR,
FIELD_KEY_TITLE,
@@ -171,6 +172,7 @@ export default {
const { sort, direction } = this.pagination;
this.track('click_button', { label: 'pagination' });
this.$emit('handleUpdatePagination', { sort, direction, page });
+ this.scrollToTop();
},
onSort({ sortBy, sortDesc }) {
const direction = sortDesc ? PAGINATION_SORT_DIRECTION_DESC : PAGINATION_SORT_DIRECTION_ASC;
@@ -179,11 +181,14 @@ export default {
this.$emit('handleUpdatePagination', { sort: sortBy, direction });
this.track('click_button', { label: `sort_${sortBy}_${direction}` });
},
+ scrollToTop() {
+ scrollToElement(this.$el);
+ },
},
};
</script>
<template>
- <div data-testid="vsa-stage-table">
+ <div data-testid="vsa-stage-table" :class="{ 'gl-min-h-100vh': isLoading || !isEmptyStage }">
<gl-loading-icon v-if="isLoading" class="gl-mt-4" size="lg" />
<gl-empty-state
v-else-if="isEmptyStage"