Set sortField
automatically
This commit is contained in:
parent
8845958ec4
commit
21707dbe5d
@ -2,16 +2,19 @@ import Vue from 'vue'
|
||||
|
||||
export default Vue.extend({
|
||||
data: () => ({
|
||||
columns: [] as Array<{ field: string }>,
|
||||
columns: [{ field: 'id' }],
|
||||
totalRecords: 0,
|
||||
serverParams: {
|
||||
sortField: '',
|
||||
sortField: 'id',
|
||||
sortType: 'asc',
|
||||
page: 1,
|
||||
perPage: 10,
|
||||
search: '',
|
||||
},
|
||||
}),
|
||||
created() {
|
||||
this.serverParams.sortField = this.columns[0].field
|
||||
},
|
||||
methods: {
|
||||
fetchData(): Promise<void> {
|
||||
return Promise.resolve()
|
||||
|
@ -157,9 +157,6 @@ export default {
|
||||
field: 'operations', label: this.$t('admin.operationsTitle'), globalSearchDisabled: true, sortable: false,
|
||||
},
|
||||
],
|
||||
serverParams: {
|
||||
sortField: 'pid',
|
||||
},
|
||||
textureChanges: {
|
||||
originalIndex: -1,
|
||||
type: 'skin',
|
||||
|
@ -150,9 +150,6 @@ export default {
|
||||
field: 'operations', label: this.$t('admin.operationsTitle'), sortable: false, globalSearchDisabled: true,
|
||||
},
|
||||
],
|
||||
serverParams: {
|
||||
sortField: 'uid',
|
||||
},
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
|
Loading…
Reference in New Issue
Block a user