diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-03-24 22:14:55 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-03-24 22:14:55 +0300 |
commit | 27c4d339e5ba650b746907317918c90dec6a0e2b (patch) | |
tree | caa51039d3241199d09b2a06f821577ab1459b83 /app/assets | |
parent | 4014deae3b6441b927d01f5f5c145ca8f1a5be43 (diff) | |
parent | 6094b306dc759ffc0cea7c7cb0193d11bc9f1fa2 (diff) |
Merge branch 'add-issue-modal-loading-indicator' into 'master'
Show loading icon when changing filter in add issues modal
Closes #29615
See merge request !10043
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/boards/components/modal/filters.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/boards/components/modal/index.js | 15 | ||||
-rw-r--r-- | app/assets/javascripts/boards/stores/modal_store.js | 1 |
3 files changed, 13 insertions, 5 deletions
diff --git a/app/assets/javascripts/boards/components/modal/filters.js b/app/assets/javascripts/boards/components/modal/filters.js index 2e22b1eca47..b214b5a7199 100644 --- a/app/assets/javascripts/boards/components/modal/filters.js +++ b/app/assets/javascripts/boards/components/modal/filters.js @@ -17,7 +17,7 @@ export default { this.filteredSearch.handleInputPlaceholder(); this.filteredSearch.toggleClearSearchButton(); }, - beforeDestroy() { + destroyed() { this.filteredSearch.cleanup(); FilteredSearchContainer.container = document; this.store.path = ''; diff --git a/app/assets/javascripts/boards/components/modal/index.js b/app/assets/javascripts/boards/components/modal/index.js index 4800407be1c..91c08cde13a 100644 --- a/app/assets/javascripts/boards/components/modal/index.js +++ b/app/assets/javascripts/boards/components/modal/index.js @@ -65,8 +65,15 @@ require('./empty_state'); }, filter: { handler() { - this.page = 1; - this.loadIssues(true); + if (this.$el.tagName) { + this.page = 1; + this.filterLoading = true; + + this.loadIssues(true) + .then(() => { + this.filterLoading = false; + }); + } }, deep: true, }, @@ -140,14 +147,14 @@ require('./empty_state'); :image="blankStateImage" :issue-link-base="issueLinkBase" :root-path="rootPath" - v-if="!loading && showList"></modal-list> + v-if="!loading && showList && !filterLoading"></modal-list> <empty-state v-if="showEmptyState" :image="blankStateImage" :new-issue-path="newIssuePath"></empty-state> <section class="add-issues-list text-center" - v-if="loading"> + v-if="loading || filterLoading"> <div class="add-issues-list-loading"> <i class="fa fa-spinner fa-spin"></i> </div> diff --git a/app/assets/javascripts/boards/stores/modal_store.js b/app/assets/javascripts/boards/stores/modal_store.js index 7ee266a831f..9b009483a3c 100644 --- a/app/assets/javascripts/boards/stores/modal_store.js +++ b/app/assets/javascripts/boards/stores/modal_store.js @@ -15,6 +15,7 @@ searchTerm: '', loading: false, loadingNewPage: false, + filterLoading: false, page: 1, perPage: 50, filter: { |