Commit 2afff609 authored by Filipa Lacerda's avatar Filipa Lacerda

Use refs instead of query the DOM

parent 6c3038e8
......@@ -35,7 +35,7 @@ export default {
onClickAction(endpoint) {
this.isLoading = true;
$(this.$el.querySelector('.has-tooltip')).tooltip('destroy');
$(this.$refs.tooltip).tooltip('destroy');
this.service.postAction(endpoint)
.then(() => {
......@@ -64,6 +64,7 @@ export default {
class="dropdown btn btn-default dropdown-new js-dropdown-play-icon-container has-tooltip"
data-container="body"
data-toggle="dropdown"
ref="tooltip"
:title="title"
:aria-label="title"
:disabled="isLoading">
......
......@@ -28,7 +28,7 @@ export default {
onClickAction(endpoint) {
this.isLoading = true;
$(this.$el.querySelector('.has-tooltip')).tooltip('destroy');
$(this.$refs.tooltip).tooltip('destroy');
this.service.postAction(endpoint)
.then(() => {
......@@ -59,6 +59,7 @@ export default {
data-toggle="dropdown"
data-placement="top"
aria-label="Manual job"
ref="tooltip"
:disabled="isLoading">
${playIconSvg}
<i
......
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