8000 v-b-modal stopped working after upgrade to 0.30 · Issue #2729 · bootstrap-vue-next/bootstrap-vue-next · GitHub
[go: up one dir, main page]

Skip to content
v-b-modal stopped working after upgrade to 0.30 #2729
@hackel

Description

@hackel

Describe the bug

After upgrading from 0.28.3 to 0.30.0, I discovered that a bunch of v-b-modal directives stopped working. This happens when the modal isn't rendered on initial load. In this particular case, it's because it's in a table, and when the table gets sorted in reverse, I get the following error:

[v-b-toggle] Target with ID profile6a5caf2560a3da84b1aa5499422167c0 not found

I don't understand this, because I can clearly see the modal with that ID in the devtools inspector, teleported to the body tag. I created a reproduction below. On load, you are able to click any of the menu items and open the modal, but when you sort the ID column in reverse, the error prints to the console and the modal will not open.

FYI—I realize this probably isn't the best way to do this, but unfortunately this pattern is used quite a lot throughout our application. Eventually I would like to rewrite it to use useModalController instead, but that day is not this day.

Reproduction

https://stackblitz.com/edit/github-ricuzkij-9ostqxbc?file=src%2Fcomponents%2FComp.vue

Used Package Manager

npm

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0