Commit 3ac2ec5c authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch '229039-environment-stop-tooltip' into 'master'

Remove jquery tooltip API call from stop environment button

See merge request gitlab-org/gitlab!44199
parents 2b8d5463 ad4f768c
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
* Used in environments table. * Used in environments table.
*/ */
import $ from 'jquery';
import { GlTooltipDirective, GlButton } from '@gitlab/ui'; import { GlTooltipDirective, GlButton } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
...@@ -40,7 +39,7 @@ export default { ...@@ -40,7 +39,7 @@ export default {
}, },
methods: { methods: {
onClick() { onClick() {
$(this.$el).tooltip('dispose'); this.$root.$emit('bv::hide::tooltip', this.$options.stopEnvironmentTooltipId);
eventHub.$emit('requestStopEnvironment', this.environment); eventHub.$emit('requestStopEnvironment', this.environment);
}, },
onStopEnvironment(environment) { onStopEnvironment(environment) {
...@@ -49,11 +48,12 @@ export default { ...@@ -49,11 +48,12 @@ export default {
} }
}, },
}, },
stopEnvironmentTooltipId: 'stop-environment-button-tooltip',
}; };
</script> </script>
<template> <template>
<gl-button <gl-button
v-gl-tooltip v-gl-tooltip="{ id: $options.stopEnvironmentTooltipId }"
:loading="isLoading" :loading="isLoading"
:title="title" :title="title"
:aria-label="title" :aria-label="title"
......
---
title: Remove jquery tooltip API call from stop environment button
merge_request: 44199
author:
type: changed
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