Commit 96b7865b authored by Regis's avatar Regis

fix UI behaviour - only make new calls when button is clicked and dropdown is not displayed

parent 28e77da9
...@@ -11,7 +11,13 @@ ...@@ -11,7 +11,13 @@
}, },
props: ['stage', 'svgs', 'match'], props: ['stage', 'svgs', 'match'],
methods: { methods: {
fetchBuilds() { fetchBuilds(e) {
const areaExpanded = e.currentTarget.attributes['aria-expanded'];
console.log('HIT');
if (areaExpanded && (areaExpanded.textContent === 'true')) return null;
return this.$http.get(this.stage.dropdown_path) return this.$http.get(this.stage.dropdown_path)
.then((response) => { .then((response) => {
this.builds = JSON.parse(response.body).html; this.builds = JSON.parse(response.body).html;
...@@ -47,7 +53,7 @@ ...@@ -47,7 +53,7 @@
template: ` template: `
<div> <div>
<button <button
@click='fetchBuilds' @click='fetchBuilds($event)'
:class="triggerButtonClass" :class="triggerButtonClass"
:title='stage.title' :title='stage.title'
data-placement="top" data-placement="top"
......
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