Click Outside
Vue Bootstrap 5 Click Outside
mdbClickOutside
is a custom directive which allows watching clicks outside the container.
Basic usage
Import the directive from mdb-vue-ui-kit
and add mdbClickOutside
to the directives
object. Now you can attach the directive to any html element or component. Check the console to see the result (F12).
If you wish to use the mousedown
event instead of the default click
, use mousedown
prop.
Click Outside - API
Import
Properties
Property | Type | Default | Description |
---|---|---|---|
mousedown
|
Boolean | false |
Change event from click to mousedown
|