Closed jsdbroughton closed 4 years ago
What version of vue-atlas are you using? v2.16
Steps to reproduce:
VaSelect
v-model
multiple
What is expected? Select and Options to populate as expected.
What is actually happening?
TypeError: Cannot read property 'length' of undefined at Proxy.VaSelectvue_type_template_id_482a76e8_scoped_true_render
If any of the referenced models are not defined on that object as either string or [] and the multiple flag is set, the component doesn't render.
string
[]
Any additional comments? (optional) I only discovered this when moving all the form item models into a single object.
There are two fixes:
<button>
:class="[`va-dropdown-toggle`, `va-select-btn`, showSelected && multiple` && typeof value !== undefined `` && value.length ?va-select-multiple: '', show ?va-select-btn-open` : '']"
:class="[`va-dropdown-toggle`, `va-select-btn`, showSelected && multiple`
undefined
`` && value.length ?
: '', show ?
[VaSelect.vue L4](https://github.com/nvms/vue-atlas/blob/master/src/Select/VaSelect.vue#L4)
What version of vue-atlas are you using? v2.16
Steps to reproduce:
VaSelect
componentv-model
to an undefined variablemultiple
flagWhat is expected? Select and Options to populate as expected.
What is actually happening?
If any of the referenced models are not defined on that object as either
string
or[]
and the multiple flag is set, the component doesn't render.Any additional comments? (optional) I only discovered this when moving all the form item models into a single object.
There are two fixes:
<button>
render::class="[`va-dropdown-toggle`, `va-select-btn`, showSelected && multiple`
&& typeof value !==undefined
`` && value.length ?
va-select-multiple: '', show ?
va-select-btn-open` : '']"