require( 'datatables.net-zf' ), no style render table
require( 'datatables.net-zf' ), no style render table
pig800509
Posts: 12Questions: 2Answers: 0
in DataTables
As title said, I use these code in react component
require( 'datatables.net-zf' );
.......
$('#example').DataTable( {
dom: "Bfrtip",
data: dataSet.data,
columns: [
{ data: null, render: function ( data, type, row ) {
// Combine the first and last names into a single table field
return data.first_name+' '+data.last_name;
} },
{ data: "position" },
{ data: "office" },
{ data: "extn" },
{ data: "start_date" },
{ data: "salary", render: $.fn.dataTable.render.number( ',', '.', 0, '$' ) }
],
select: true
} );
No style render table,
Should I import css ? But css folder already exist in that package(node_modules/datatables.net-zf/css)
I have tried Import 'datatables.net-zf';
that is useless.
thank you
This discussion has been closed.
Replies
We'd really need a link to a page showing the issue. I'm not sure if the issue is a style not being loaded, Zurb not having its table styles, or something else.
Allan
import dataTables.foundation.css doesn't work,either, but
work perfectly, I think something is wrong in all styling package, I give up to use styling dataTables in create-react-app, maybe I can use to the basic style.
Thanks