wffranco / vue-strap

Bootstrap components built with Vue.js
http://wffranco.github.io/vue-strap/
MIT License
338 stars 133 forks source link

Update Select.vue to handle undefined button case #161

Open webnoob opened 6 years ago

webnoob commented 6 years ago

When the X button has been pressed on the select element then the select component itself is no longer visible for whatever reason, the $refs.btn is undefined. Check for this to avoid Uncaught TypeError: Cannot read property 'focus' of undefined.

Note: The use case in this instance for me is having the select component in a tab, when the X is pressed, I change tab thus removing the select component from scope.