VueJS and Datatable

VueJS and Datatable

azizkazdalazizkazdal Posts: 1Questions: 1Answers: 0

I am using datatable and vuejs together. Datatable is inside the vuejs componentn and successfuly initialized by vuejs component. But I have some question about how to use vuejs methods clicking a checkbox element that inside datatable row

      {
            "title": "Listeleme", "data": "a",
            "render": function (data, type, row) {
                if (data === true) {
                    return '<input type="checkbox" id="A' + row.id +  '" onclick="checkboxChange(this)" data-role="checkbox" data-type="a" checked>';
                } else {
                    return '<input type="checkbox" id="A' + row.id + '" onclick="checkboxChange(this)" data-role="checkbox" data-type="a">';
                }
            }
        },

I need to change onclick="checkboxChange(this)" as v-on:click="checkboxChange" to access vuejs component method

Note : If I write directly vuejs methods name as above , can not access the methods. It is just doing nothing

thank you.

Answers

  • UrielGlz_UrielGlz_ Posts: 2Questions: 1Answers: 0

    Hi,
    I am having trouble painting my tbody by Vue.js, you can share the example with me. thanks

This discussion has been closed.