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

Not able to use nested attributes #143

Open
Cigoler opened this issue Feb 24, 2020 · 1 comment
Open

Not able to use nested attributes #143

Cigoler opened this issue Feb 24, 2020 · 1 comment

Comments

@Cigoler
Copy link

Cigoler commented Feb 24, 2020

https://codesandbox.io/s/vue-template-rev9c

suppliers: [
        { id: 1, supplier_id: 22, supplier: {
          id: 22, 
          name: "Supplier One"
        } }, { id: 2, supplier_id: 32, supplier: {
          id: 32, 
          name: "Supplier Two"
        } },
      ],
<model-list-select
      :list="suppliers"
      option-value="id"
      option-text="supplier.name"
      v-model="form.supplier"
      placeholder="supplier"
      class="form-control col-md-7 col-xs-12"
    ></model-list-select>

I can't get it to work with a list like this. It won't accept supplier.name for the option text. It just displays blank. If I put in supplier then I can see the data is there and available as the name is now: { "supplier_id": 32, "name": "Supplier Two" } Help appreciated if it's (likely) just me being dense.

@vanrijs
Copy link

vanrijs commented Mar 16, 2021

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants