Can anyone tell me why the custom column won't appear? The date pulled from the api is rendering but the additional column isn't.
<script>
$(document).ready(function () {
$("#data").DataTable({
ajax: "/api/data",
columns: [
{ data: "name" },
{ data: "age", searchable: false },
{ data: "address", orderable: false, searchable: false },
{ data: "phone", orderable: false, searchable: false },
{ data: "email" },
],
columnDefs: [
{
targets: -1,
data: null,
defaultContent: "<button>Click!</button>",
},
],
});
});
</script>