Use refs instead of query the DOM
This commit is contained in:
parent
6c3038e871
commit
2afff60982
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue