jamesdordoy / laravel-vue-datatable

Vue.js Datatable made for Laravel
https://jamesdordoy.github.io/laravel-vue-datatable
MIT License
151 stars 52 forks source link

event and handler I want to use for multiple buttons inside a column #148

Closed mohammad-ebrahimi-it closed 2 years ago

mohammad-ebrahimi-it commented 2 years ago

hi @jamesdordoy

i have problem .

<template> <div> <div class="form-group"> <button class="btn btn-outline-info btn-sm" @click="editItem(data)"><i class="fa fa-pencil-alt"></i></button> <button class="btn btn-outline-danger btn-sm"@click="deleteItem(data)"><i class="fa fa-trash"></i></button> </div> </div> </template>

<script> export default { props: { data:{},

    `deleteItem:{`
        `type:Function`
   ` },`
   ` editItem:{`
       ` type:Function`
   ` }`
`},`

} </script>

and my columns is :

{ label: 'actions', name: 'actions', type: 'html', component:Btn, comp:Btn, handler: this.editItem, event: 'editItem, deleteItem',`

            `},`