export default {
  props: {
    service: {
      type: String,
      required: true
    },
    method: {
      type: String
    },
    query: {
      type: Object
    },
    queryWhen: {
      type: [ Boolean, Function ],
      default: true
    },
    // For get requests
    id: {
      type: [ Number, String ]
    },
    // If a separate query is desired to fetch data, use fetchQuery
    // The watchers will automatically be updated, so you don't have to write 'fetchQuery.propName'
    fetchQuery: {
      type: Object
    },
    watch: {
      type: Array,
      default () {
        return []
      }
    },
    immediate: {
      type: Boolean,
      default: true
    },
    local: {
      type: Boolean,
      default: false
    }
  },
  computed: {
    findItems () {
      return this.$store.getters[`${this.service}/find`]({ query: this.query }).data
    },
    getItem () {
      const getArgs = this.getArgs(this.query)

      return this.$store.getters[`${this.service}/get`](getArgs.length === 1 ? this.id : getArgs)
    },
    items () {
      if (this.method === 'find') {
        return this.findItems
      } else if (this.method === 'get') {
        return this.getItem
      } else if (this.id !== undefined && this.id !== null) {
        return this.getItem
      } else {
        return this.findItems
      }
    }
  },
  methods: {
    getArgs (queryToUse) {
      const query = queryToUse || this.fetchQuery || this.query
      const getArgs = [this.id]

      if (query) {
        getArgs.push({ query })
      }

      return getArgs
    },
    findData () {
      const query = this.fetchQuery || this.query

      if (typeof this.queryWhen === 'function' ? this.queryWhen(this.query) : this.queryWhen) {
        return this.$store.dispatch(`${this.service}/find`, { query })
      }
    },
    getData () {
      const getArgs = this.getArgs()

      if (typeof this.queryWhen === 'function' ? this.queryWhen(...getArgs) : this.queryWhen) {
        return this.$store.dispatch(`${this.service}/get`, getArgs.length === 1 ? this.id : getArgs)
      }
    },
    fetchData () {
      if (!this.local) {
        if (this.method === 'find') {
          return this.findData()
        } else if (this.method === 'get') {
          return this.getData()
        } else if (this.id !== undefined && this.id !== null) {
          return this.getData()
        } else {
          return this.findData()
        }
      }
    }
  },
  watch: {
    id: 'fetchData'
  },
  created () {
    if (!this.$FeathersVuex) {
      throw new Error(`You must first Vue.use the FeathersVuex plugin before using the 'feathers-vuex-data' component.`)
    }
    if (!this.$store.state[this.service]) {
      throw new Error(`The '${this.service}' plugin cannot be found. Did you register the service with feathers-vuex?`)
    }

    if (this.fetchQuery || this.query || (this.id !== null && this.id !== undefined)) {
      this.watch.forEach(prop => {
        if (typeof prop !== 'string') {
          throw new Error(`Values in the 'watch' array must be strings.`)
        }
        if (this.fetchQuery) {
          if (prop.startsWith('query')) {
            prop.replace('query', 'fetchQuery')
          }
        }
        this.$watch(prop, this.fetchData)
      })

      if (this.immediate) {
        this.fetchData()
      }
    }
  },
  render () {
    return this.$scopedSlots.default({
      items: this.items
    })
  }
}

@@ -730,16 +730,115 @@
 : false%0A
+    %7D,%0A    editScope: %7B%0A      type: Function,%0A      default (scope) %7B%0A        return scope%0A      %7D%0A
     %7D%0A  
@@ -3465,72 +3465,157 @@
     
-return this.$scopedSlots.default(%7B%0A      items: this.items%0A    %7D
+const defaultScope = %7B items: this.items %7D%0A    const scope = this.editScope(defaultScope)%0A%0A    return this.$scopedSlots.default(scope %7C%7C defaultScope
 )%0A  

Create editScope function prop