Skip to content

[MdSelect] not rendering correctly with backend service #1262

@emman27

Description

@emman27

Steps to reproduce

Have an md-select with options coming from an endpoint. Options load correctly, values load correctly but doesn't display in the select box.

Which browser?

Chrome 62, Ubuntu 16.04

VueMaterial 1.0.0-beta-7

What is expected?

What is actually happening?

screenshot from 2017-12-05 15-55-18
screenshot from 2017-12-05 15-54-39

As can be seen, the v-model is correctly loading but the field remains empty (here this select in particular is a multiple, but it's also broken for the single selects)

Reproduction Link

Simplest repro:

<template>
  <md-field>
    <label>Payment Modes <span class="red">*</span></label>
    <md-select required v-model="paymentModes" multiple>
      <md-option v-for="option in options" :key="option" :value="option">{{option}}</md-option>
    </md-select>
  </md-field>
</template>

<script>
export default {
  data() {
    return { options: [] }
  },
  async mounted() {
    this.options = await someApiCall();
    this.selected = await anotherApiCall();
  }
}
</script>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions