Programatically accessible slots for Toasts
See original GitHub issueIs your feature request related to a problem? Please describe…
Most of the time when I create a toast I’m doing it programmatically (aka via this.$bvToast) rather than an inline <b-toast> component. However, I also need to be able to include buttons and links and other content in the body of the toast. I cannot see a way to do that right now.
Describe the solution you’d like
I’d like to be able to inject content into the slot programatically. One way would be to allow me to do an inline template. Another way would be to give me a reference to the component created by $bvToast so that I could manipulate the slot via:
component.$slots.default = put content here
Describe alternatives you’ve considered
I can’t think of any work arounds for this other than just not using toasts. If I had a work around I likely wouldn’t even have filed a feature request.
Additional context
Here’s a simple contrived example.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Is there a way to update the nodes once the toast has been created/shown?
Yeah this is a game changer of a feature. I feel like there are light bulbs exploding above my head right now.