Skip to content

<b-modal> bv::hide::modal / $bvModal.hide does not work if no id was explicitly set #3389

Closed
@pschucker

Description

@pschucker

Describe the bug

If no id is set for <b-modal> neither this.$root.$emit("bv::hide::modal", modalId); nor this.$bvModal.hide(modalId) hides the modal, when passing the generic id, that was catched with this.$root.$on("bv::modal::show", (ev, modalId) => {})

Steps to reproduce the bug

  1. Create <b-modal> without id
  2. Open modal and listen to the bv::modal::show-event to get the modal id
  3. Try to close the modal with one of the methods explained before

Expected behavior

The opened modal should hide, because we have a unique id that refers to the currently opened modal.

Versions

Libraries:

  • BootstrapVue: 2.0.0.rc21
  • Bootstrap: 4.#.#
  • Vue: 2.6.10

Demo link

Demo

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions