2
votes

can anyone tell me why my "b-form-select-option" is not working?

Thats my code:

enter image description here

I am using Vue with Bootstrap, everything else works, except for this single command. I am getting the standard "unknown html tag" error.

What is wrong here? I just copied the code from https://bootstrap-vue.js.org/docs/components/form-select/ and adapted it to my project.

3
Are you using version v2.2.0? That is when that component was introduced. Also the typescript declaration for the sub-component is missing in v2.2.0, but will be fixed in v2.2.1 (github.com/bootstrap-vue/bootstrap-vue/pull/4595)Troy Morehouse
v2.2.1 has just been releasedTroy Morehouse

3 Answers

3
votes

Make sure you are using BootstrapVue v2.2.x.

The <b-form-select-*> sub components were introduced in v2.2.0.

2
votes

the "unknown html tag" error means your editor doesn't recogonize thie element, your web app can still work, you can add this tag as an custom tag in your editor preference

-1
votes

There you have a simple example of usage.

You have to declare options inside <script>...</script>, like this:

options: [
    {
         value: null,
         text: 'Please select an option'
    },
]