diff options
author | Regis <boudinot.regis@yahoo.com> | 2016-12-27 12:24:11 -0700 |
---|---|---|
committer | Regis <boudinot.regis@yahoo.com> | 2016-12-27 12:24:11 -0700 |
commit | 75bddd01d0b611fcd45e8a9789e7f8e650e5850b (patch) | |
tree | b61fb33311d69aff25d3869ed0d8ff42b0521b75 | |
parent | abed2c1a9443180dddb3c26d29d447d2e7562337 (diff) | |
download | gitlab-ce-75bddd01d0b611fcd45e8a9789e7f8e650e5850b.tar.gz |
avoid making multiple calls on blur on collapse click events
-rw-r--r-- | app/assets/javascripts/vue_pipelines_index/stage.js.es6 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_pipelines_index/stage.js.es6 b/app/assets/javascripts/vue_pipelines_index/stage.js.es6 index 026fba80ca2..920ae5dac9a 100644 --- a/app/assets/javascripts/vue_pipelines_index/stage.js.es6 +++ b/app/assets/javascripts/vue_pipelines_index/stage.js.es6 @@ -13,7 +13,13 @@ props: ['stage', 'svgs', 'match'], methods: { fetchBuilds() { - this.$http.get(this.stage.dropdown_path) + if (this.request) { + this.request = false; + this.builds = ''; + return null; + } + + return this.$http.get(this.stage.dropdown_path) .then((response) => { this.request = true; this.builds = JSON.parse(response.body).html; @@ -55,6 +61,7 @@ <div class="dropdown inline build-content"> <button @click='fetchBuilds' + @blur='fetchBuilds' class="has-tooltip builds-dropdown js-builds-dropdown-button" data-placement="top" :title='stage.title' |