@huntianning/components
Version:
Custom components for HTN
28 lines (27 loc) • 475 B
JavaScript
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
}
}