I am trying to pass datatables options to my Tabular instance but nothing seems to work.
The settings I would like to pass are
"sDom": "<'table-responsive't><'row'<p i>>",
"sPaginationType": "bootstrap",
"destroy": true,
"scrollCollapse": true,
"oLanguage": {
"sLengthMenu": "_MENU_ ",
"sInfo": "Showing <b>_START_ to _END_</b> of _TOTAL_ entries"
},
"iDisplayLength": 5
How do I get these to work?
My code sample:
KM.RegionDatables.Regions= new Tabular.Table({
name: "RegionList",
sDom: "<'table-responsive't><'row'<p i>>",
sPaginationType: "bootstrap",
collection: KM.Regions,
columns: [
{data: "regionTitle", title: "Region Title"},
{data: "regionCode", title: "Region Code"},
{data: "focalPoint", title: "Focal Point"},
{data: "contactEmail", title: "Email"}
]
});
Any time I try to pass an option (an example is the code above -sPaginationType: “bootstrap”) get this error:
"Error: TypeError: Cannot read property 'fnInit' of undefined"