Add support for bootstrap-vue "b-btn"
simonbrunel opened this issue · 3 comments
I'm not sure if it's a bug or a feature but it doesn't seem to work correctly when using the v-promise-btn
directive inside a <b-btn>
component, for example: https://jsfiddle.net/kb728u3j/
<b-btn v-promise-btn @click="submit">Create</b-btn>
Currently, nothing happen (the spinner is not displayed - the hidden
class isn't removed when loading). The same code works as expected with a regular <button>
.
Versions:
- vue: 2.5.16
- vue-promise-btn: "1.1.0"
- bootstrap-vue: "2.0.0-rc.11"
- Chrome 67.0.3396.99 / Win 10
It's caused by the b-btn
registering a listener on click so, when evaluating handler
, response
is undefined because the function invoker
handles multiple functions and returns undefined.
Any idea how to workaround that issue without using a <form>
?
I think they both incompatible. We even can't handle click event before b-btn because directive init priority less than component's.
@simonbrunel this issue fixed with v2.0.0, now you can use this plugin with b-btn and other 3rd party plugins in extended
mode.