niiknow / vue-datatables-net

Vue jQuery DataTables.net wrapper component
https://niiknow.github.io/vue-datatables-net/
MIT License
171 stars 58 forks source link

How to listen to datatable specific events #13

Closed jpujol880807 closed 5 years ago

jpujol880807 commented 5 years ago

Hi, this is more like a question. How can i listen to native events from the datatable. Let's suppose i want to listen to the select event from datatable (https://datatables.net/reference/event/select) how can i place a handler in my component for it?

jpujol880807 commented 5 years ago

Sorry i came up with one solution i don't know if os the best way but it works in my case using ref $(this.$refs.yourDatableRef.$refs.table).DataTable().on( 'select', function (e, dt, type, indexes) { console.log(indexes); }); closing it :')