summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/groups/components/overview_tabs.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/groups/components/overview_tabs.vue')
-rw-r--r--app/assets/javascripts/groups/components/overview_tabs.vue5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/groups/components/overview_tabs.vue b/app/assets/javascripts/groups/components/overview_tabs.vue
index d0c5846ac88..46ab30367a0 100644
--- a/app/assets/javascripts/groups/components/overview_tabs.vue
+++ b/app/assets/javascripts/groups/components/overview_tabs.vue
@@ -15,6 +15,7 @@ import eventHub from '../event_hub';
import GroupsApp from './app.vue';
const [SORTING_ITEM_NAME] = OVERVIEW_TABS_SORTING_ITEMS;
+const MIN_SEARCH_LENGTH = 3;
export default {
components: { GlTabs, GlTab, GroupsApp, GlSearchBoxByType, GlSorting, GlSortingItem },
@@ -136,7 +137,9 @@ export default {
handleSearchInput(value) {
this.search = value;
- this.debouncedSearch();
+ if (!this.search || this.search.length >= MIN_SEARCH_LENGTH) {
+ this.debouncedSearch();
+ }
},
debouncedSearch: debounce(async function debouncedSearch() {
this.handleSearchOrSortChange();