This code worked in version 2:
$('#example')
.on(
"preInit.dt",
function() {console.log("preInit");}
)
.DataTable();
This code does not work in version 3:
new DataTable('#example')
.on(
"preInit.dt",
function() {console.log("preInit");}
);
I guess because the table is already instantiated by the time on() is called. This works fine, as expected:
new DataTable('#example', {
on: {
"preInit.dt",
function() {console.log("preInit");}
}
});
Not sure if the method I was using with v2 is unusual or not – maybe this isn't a bug at all – but I thought I'd mention it as a stumbling block I came across during the update to 3.0.
This code worked in version 2:
This code does not work in version 3:
I guess because the table is already instantiated by the time
on()is called. This works fine, as expected:Not sure if the method I was using with v2 is unusual or not – maybe this isn't a bug at all – but I thought I'd mention it as a stumbling block I came across during the update to 3.0.