You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am porting over from using https://github.com/euvl/vue-js-modal to using bootstrap-vue's modal and one thing I'm missing is that this other project had a means of programatically showing/hiding modals as well as a means of "toggling" modals
I need this because I use keyboard shortcuts to open modals and I want to be able to press the letter "A" and it will open a model if it's not opened, and if it is opened then it will close it.. effectively toggling it
Currently it seems you can only show or hide by using
this.$root.$emit('bv::show::modal', 'idOfModal')
and
this.$root.$emit('bv::hide::modal', 'idOfModal')
Since I created a single "modal" component which implements b-modal and I create all my modals by extending this component, I was easily able to add this functionality like this:
I am porting over from using https://github.com/euvl/vue-js-modal to using bootstrap-vue's modal and one thing I'm missing is that this other project had a means of programatically showing/hiding modals as well as a means of "toggling" modals
I need this because I use keyboard shortcuts to open modals and I want to be able to press the letter "A" and it will open a model if it's not opened, and if it is opened then it will close it.. effectively toggling it
Currently it seems you can only show or hide by using
Since I created a single "modal" component which implements b-modal and I create all my modals by extending this component, I was easily able to add this functionality like this:
but it would be nice if "toggle" was included in a future release
thanks!
The text was updated successfully, but these errors were encountered: