This directive lacks the possibility of disabling events. The only way to do it (not passing function) causes console.warn.
It is important in terms of app performance. Clickaway is used often on sidebars/dropdowns, which means that the closing mechanism would be called multiple times on every app click.
I have made my own clickaway directive which solves this problem, you can implement my solution.
code:
https://github.com/coreui/coreui-vue/blob/master/src/directives/CClickaway.js
docs:
https://coreui.io/vue/docs/directives/clickaway.html
Btw. Micro/Macrotasks issue seems to have been resolved.
This directive lacks the possibility of disabling events. The only way to do it (not passing function) causes console.warn.
It is important in terms of app performance. Clickaway is used often on sidebars/dropdowns, which means that the closing mechanism would be called multiple times on every app click.
I have made my own clickaway directive which solves this problem, you can implement my solution.
code:
https://github.com/coreui/coreui-vue/blob/master/src/directives/CClickaway.js
docs:
https://coreui.io/vue/docs/directives/clickaway.html
Btw. Micro/Macrotasks issue seems to have been resolved.