Skip to content

fix(tooltip): Pass through tooltip programmatic actions events

Enrique Alcántara requested to merge pass-through-tooltip-events into master

What does this MR do?

BootstrapVue tooltip component allows to programmatically open, close, disable, and enable tooltips by triggering events. GitLab UI tooltip component, which is a simple wrapper around BVTooltip, can’t do the same because when emitting one of the events:

<script>
export default {
  methods: {
    hide() {
      this.$refs.glTooltip.$emit('hide');
    }
  }
}
</script>

The event is emitted in the wrapper but the underlying BVTooltip instance does not catch this event. This Merge Request fixes this situation.

Does this MR meet the acceptance criteria?

Conformity

  • Code review guidelines.
  • GitLab UI's contributing guidlines.
  • If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
  • If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
  • If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui package can be upgraded quickly after the changes are released:
  • Added the ~"component:*" label(s) if applicable.
Edited by Enrique Alcántara

Merge request reports