diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-06-06 15:46:31 -0500 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-06-23 02:12:45 -0500 |
commit | 6cb575d612cd2470ee4224159fa16458f5426f73 (patch) | |
tree | da44a611e31d2f694ed8f3e55b1e45aac3703cae /app/assets/javascripts/vue_shared/directives | |
parent | bf0b3d835211077cb10ee3aec9ee6e0bca2304b6 (diff) | |
download | gitlab-ce-6cb575d612cd2470ee4224159fa16458f5426f73.tar.gz |
Add support for multiple tooltips in the same Vue component
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/33223
Diffstat (limited to 'app/assets/javascripts/vue_shared/directives')
-rw-r--r-- | app/assets/javascripts/vue_shared/directives/tooltip.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/directives/tooltip.js b/app/assets/javascripts/vue_shared/directives/tooltip.js new file mode 100644 index 00000000000..dc896cf5c7d --- /dev/null +++ b/app/assets/javascripts/vue_shared/directives/tooltip.js @@ -0,0 +1,13 @@ +export default { + bind(el) { + $(el).tooltip(); + }, + + componentUpdated(el) { + $(el).tooltip('fixTitle'); + }, + + unbind(el) { + $(el).tooltip('destroy'); + }, +}; |