export default {
  name: 'UiGridSortProxy',
  inject: ['UiGrid'],
  props: {
    items: {
      type: Array
    },
    defaultSort: {
      type: Object
    }
  },
  watch: {
    defaultSort(val) {
      this.UiGrid.sortProps.defaultSort = val
    },
    items(val) {
      this.UiGrid.sortProps.items = val
    }
  },
  created() {
    this.UiGrid.sortProps.items = this.items
    this.UiGrid.sortProps.defaultSort = this.defaultSort
  },
  render() {
    return null
  }
}
