<template>
  <select name="dropdown" v-model="newrow[field]" @change="change">
    <option v-for="item in data" :key="item.id" :value="item">{{displayFunc(item)}}</option>
  </select>
</template>

<script>
export default {
  name: 'Dropdown',
  props: ['data', 'newrow', 'field', 'displayFunc'],
  methods: {
    change: function () {
      this.$emit('change')
    }
  },
  data: function () {
    return {}
  }
}
</script>

<style scoped>
</style>
