Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

b-form-select text-field does not support nesting #4385

Closed
sprocket99 opened this issue Nov 14, 2019 · 3 comments · Fixed by #4386
Closed

b-form-select text-field does not support nesting #4385

sprocket99 opened this issue Nov 14, 2019 · 3 comments · Fixed by #4386

Comments

@sprocket99
Copy link

sprocket99 commented Nov 14, 2019

Not sure if this is classed as a bug or feature request. But I cannot get this to work:

<b-form-select :options="students" text-field="name.first" value-field="id" />

It displays "undefined" in the drop down. The reason is because the text-field of first is not a direct property of a firmware object. Is the only way of making this to somehow make new objects with the properties at the top level? That would be very inconvenient.

In this example, students is an array, with a property name with sub props first and last.

I am using version 2.0.4

@Hiws
Copy link
Member

Hiws commented Nov 14, 2019

As a workaround you can create the options yourself using a v-for

<b-select v-model="selected">
  <option v-for="student in students" :value="student.id">{{ student.name.first }}</option>
</b-select>

@sprocket99
Copy link
Author

Thanks @Hiws Ill use that workaround for now, I have been avoiding it because VS shows a green sqiggly:

image

@tmorehouse
Copy link
Member

BootstrapVue v2.2.0 has been released.

@tmorehouse tmorehouse added the Status: Fixed / Implemented Issue fixed by a new release label May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment