Working with BootstrapVue
, I am trying to trigger my b-form-file
after clicking on a b-button
for style reasons. Additionally, I want the b-form-file
to be hidden so it is not visible.
I attempted the following approach, but it did not work for me:
<b-button variant="danger" @click="$refs.upload.click()">Upload</b-button>
<b-form-file ref="upload"></b-form-file>
If you have any ideas on how I can solve this issue without using jQuery code or regular HTML input elements (I need to use b-form-file
), please share your thoughts. Thank you!
-> I want to avoid jQuery code and cannot use base HTML input
- I need to utilize b-form-file