Skip to content
Snippets Groups Projects
Commit 96b7865b authored by Regis's avatar Regis
Browse files

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

parent 28e77da9
No related branches found
No related tags found
Loading
Loading
@@ -11,7 +11,13 @@
Loading
@@ -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;
Loading
@@ -47,7 +53,7 @@
Loading
@@ -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"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment