symfony encore / webpack integration

symfony encore / webpack integration

felekfelek Posts: 3Questions: 2Answers: 0

Hello i have following problem.
I import tables like so:

import DataTable from 'datatables';

then use it:

    $(document).ready(function() {
        var table = $('#example').DataTable( {
            scrollY:        "300px",
            scrollX:        true,
            scrollCollapse: true,
            paging:         false,
        } );
    } );

after i want to add plugin:
import 'datatables.net-fixedcolumns';
and add to config:
fixedColumns: {
leftColumns: 1,
rightColumns: 1
}

i have error like on screen shot
:

i try also require, import with name

With no results.
Can some one know how to import datatables and plugins ?
I am using symfony encore, This is webpack wrapprer to config.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 62,339Questions: 1Answers: 10,229 Site admin
    Answer ✓

    Looks like you haven't loaded in the FixedColumns CSS.

    Allan

  • felekfelek Posts: 3Questions: 2Answers: 0

    True it work well. Thx

This discussion has been closed.