Commit 75bddd01 authored by Regis's avatar Regis

avoid making multiple calls on blur on collapse click events

parent abed2c1a
...@@ -13,7 +13,13 @@ ...@@ -13,7 +13,13 @@
props: ['stage', 'svgs', 'match'], props: ['stage', 'svgs', 'match'],
methods: { methods: {
fetchBuilds() { 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) => { .then((response) => {
this.request = true; this.request = true;
this.builds = JSON.parse(response.body).html; this.builds = JSON.parse(response.body).html;
...@@ -55,6 +61,7 @@ ...@@ -55,6 +61,7 @@
<div class="dropdown inline build-content"> <div class="dropdown inline build-content">
<button <button
@click='fetchBuilds' @click='fetchBuilds'
@blur='fetchBuilds'
class="has-tooltip builds-dropdown js-builds-dropdown-button" class="has-tooltip builds-dropdown js-builds-dropdown-button"
data-placement="top" data-placement="top"
:title='stage.title' :title='stage.title'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment