title: Expected array got function. Passing function into component vuejs
body: <p>I am trying to pass a function into my component and I keep getting this error back. "Invalid prop: type check failed for prop "form_type". Expected Array, got Function." My function returns an array so I am a little lost on how to fix this.</p>
  
  <p>The function I am referencing is selectedType &amp; the component in question is ChildTab</p>
  
  <pre><code>    &lt;template&gt;
          &lt;div class="row"&gt;
                          &lt;q-field
                              label="Contact Type"
                              :labelWidth="3"
                              error-label="Please select a contact type"
                              :error="!!failed_validations.contact_type"
                          &gt;
                              &lt;q-select v-model="contact_type" :options="contact_types"/&gt;
                          &lt;/q-field&gt;
                  &lt;/div&gt;
  
  
                  &lt;ChildTabs
                      :form_type="selectedType"
                  /&gt;
  
                  &lt;q-field class="float-right"&gt;
                      &lt;q-btn color="faded" v-on:click="goBack()"&gt;Cancel&lt;/q-btn&gt;
                      &lt;q-btn color="green-6" v-on:click="selectedType()"&gt;Submit&lt;/q-btn&gt;
                  &lt;/q-field&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/template&gt;
  
      &lt;script&gt;
        'use strict';
  
        import ChildTabs from '../tabs';
  
        export default {
          name: 'contacts-view',
          data: function () {
              return {
                  contact_type: '',
                  contact_types: [
                      {
                          label: 'Pregnancy',
                          value: 'pregnancy',
                          form_type: [
                              'BreastFeeding',
                              'Pregnancy'
                          ]
                      },
                      {
                          label: 'Post Partum (Includes Birth)',
                          value: 'postpartum',
                          form_type: [
                              'Birth',
                              'BreastFeeding',
                              'PostPartum'
                          ]
                      },
                      {
                          label: '1 - 2 Month',
                          value: '1_2_months',
                          form_type: [
                              'BreastFeeding',
                              'DuoMonths'
                          ]
                      },
                      {
                          label: '6 Month',
                          value: '6_months',
                          form_type: [
                              'SixMonth'
                          ]
                      }
                  ],
              }
          },
  
          props: {
  
          },
  
          computed: {
              selectedType: function ()
          {
              var values = this.contact_types.map(function(o) { return o.value });
              var index = values.indexOf(this.contact_type);
              this.selectedForms = this.contact_types[index].form_type
  //            console.log(this.selectedForms);
              return this.selectedForms;
          }
          },
          methods: {
  
          },
  
          created: function () {
              this.selectedType();
          },
  
          components: {
              ChildTabs
          }
      }
      &lt;/script&gt;
  </code></pre>