vue-search-select icon indicating copy to clipboard operation
vue-search-select copied to clipboard

Not able to use nested attributes

Open Cigoler opened this issue 5 years ago • 1 comments

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.

Cigoler avatar Feb 24 '20 09:02 Cigoler

+1

vanrijs avatar Mar 16 '21 17:03 vanrijs