detect a click outside of an element
https://stackoverflow.com/questions/64062548/vuejs-transition-not-working-as-dynamic-component