Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82760

The example with Modal (responsive table) from the official Datatables.net website doesn't work

$
0
0

Hello colleagues!

I'm trying to reproduce the example from the page https://datatables.net/extensions/responsive/examples/display-types/modal.html with a modal with table row details being displayed when clicking on the first column. I made the imports of CSS and JS as indicated in the example, but the icon is not inserted in the first column nor anything happens when I click on the column.
I would like to know if anyone has any more examples of modal used along with datatables to be able to pass me? My code is the following:

$(document).ready(function () {
$('#example').DataTable({
responsive: {
details: {
display: $.fn.dataTable.Responsive.display.modal({
header: function (row) {
var data = row.data();
console.log(data);
console.log(data[0]);
console.log(data[1]);
return 'Details for ' + data[0] + ' ' + data[1];
}
}),
renderer: $.fn.dataTable.Responsive.renderer.tableAll()
}
}
});
});

Obs: I'm using the Vue JS framework and putting the script inside the setup function section.


Viewing all articles
Browse latest Browse all 82760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>