Javascript

08
Apr
2016

Making VueJS and DataTables Play Nice

Vue / DataTablesI recently started using VueJS.  Well, I suppose more specifically I've recently started learning VueJS by using it on a project.

The project was formerly a rather messy nodeJS/AngularJS project which is being rebuilt with Laravel, but parts of the frontend needed to remain more real-timey.

Anyway, I needed Datatables to play nice with Vue so that I could leverage it to render dynamic tables with fixed headers and columns (the whole purpose of picking DataTables in the first place).

When I built this in Angular I was able to make use of a custom angular directive that I found, it wasn't ideal but it worked -- mostly.  I was unable to track down anything similar for Vue, so I built something myself.