BFormSelect not rendering dropdown selection
See original GitHub issueDescribe the bug
I’m getting an error: Error in render: "TypeError: Cannot convert undefined or null to object"
. It was rendering some days ago. However, when I returned to the form yesterday, I noticed that all the select fields were not rendering.
Steps to reproduce the bug
- The options prop is set to a Vuex getter.
- Vuex state is populated with data via an axios called made before route is entered.
Expected behavior
BFormSelect should render. Other input field such as BInput are rendering.
Versions
Libraries:
- BootstrapVue: 2.0.0-rc.24
- Bootstrap: 4.3.1
- Vue: 2.6.11
Environment:
- OS: Windows 10
- Browser: Chrome
- Version: 80.0.3987.163 (Official Build) (64-bit)
<b-input-group
class="inputGroup"
id="nameOfOrgInputGroup"
>
<b-input-group-prepend>
<b-input-group-text>
<i
class="icon-user"
></i>
</b-input-group-text>
</b-input-group-prepend>
<b-input-group-prepend>
<b-input-group-text
>Gender</b-input-group-text
>
</b-input-group-prepend>
<b-form-select
class="form-control"
placeholder="Gender"
:options="getGendersForSelect"
id="gender"
v-model="$v.form.gender.$model"
:state="chkState('gender')"
></b-form-select>
</b-input-group>
import { mapGetters, mapActions, mapMutations } from "vuex";
...
...mapGetters("genders", ["getGendersForSelect"]),
...
...mapActions("genders", ["loadGendersForSelect"]),
Bootstrap-Vue is loaded via main.js
import BootstrapVue from "bootstrap-vue";
Vue.use(BootstrapVue);
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Form Select | Components - BootstrapVue
Custom component using cross-browser custom styles. Optionally generate entries based on an array, array of objects.
Read more >Bootstrap vue selecting the object from a list of objects b-form ...
You can bind the entire object to the value of an <option> tag. ... That way you'll get the entire object in the...
Read more >v-model on b-form-select not working - CodePen
URL Extension Required. When linking another Pen as a resource, make sure you use a URL Extension of the type of code you...
Read more >Vue-Multiselect | Vue Select Library
:hide-selected="true" – already selected options will not be displayed in the dropdown; :internal-search="false" – disables the multiselect's internal search ...
Read more >Playground with form select in bootstrap-vue for vuejs - YouTube
When you working with form select inside bootstrap-vue you have the power to make it mor dynamic, but you can allways add your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So I added empty arrays to the options props as fallbacks and I think the form is still rendering well.
Thank you @tmorehouse.
Let us know how it goes…