vuetify-admin
vuetify-admin copied to clipboard
how to use '_id' instead 'id' field in datatable actions
hi, first of all thank you for this great template. i add custom data provider and it is working well. But my records id label is '_id' and default edit/delete action buttons not working with that label (when i clicked show or edit buttton it is routing to the dashboard) how can i tell your system to use '_id' instead 'id' ?
if you using is mongoose, to model write this
Schema.set('toJSON', {
virtuals: true,
versionKey:false,
transform: function (doc, ret) { delete ret._id }
})