Please inherit relatedTarget from original event for modal.show
See original GitHub issueAs Bootstrap.Modal designed, data can be fetch from the trigger button to the modal.
But when I tried to do this in bootstrap-vue
, event.relatedTarget
seems being null when I need it. (And I’m sure that I trigger the modal via a button, a b-btn
)
Modal show trigger:
Related methods:
Browser Console:
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Bootstrap modal dialog, show.bs.modal event relatedTarget is ...
relatedTarget ) was not available for the 'show.bs.modal' event. Anyone with the same problem should check his bootstrap version first.
Read more >how do i make model popup to persist on page unless button ...
Hi micah,. In which scenario the modal popup will disappear ? After the submit button clicked ? The buttons are asp.net buttons or...
Read more >Bootstrap Popover X - © Kartik - Krajee JQuery Plugins
Event inherited from Bootstrap Modal. This event is fired when the popover has finished being hidden from the user (will wait for CSS...
Read more >BSN - Native JavaScript for Bootstrap - GitHub Pages
This is a test demonstrating the component capabilities and it's original events, you should open the console and start clicking, you will be...
Read more >MouseEvent.relatedTarget - Web APIs | MDN
The MouseEvent.relatedTarget read-only property is the secondary target for the mouse event, if there is one. ... For events with no secondary ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently the
show()
method doesn’t support passing a value to it, but it might be something we could do, and pass that value into the show events emitted.The other option is to have your button handlers set a flag in your app/component data, and then inspect that value on modal open to determine which button triggered the open.
No worries, that is what I think I should do.