scrollResize plug-in throws : Uncaught TypeError: DataTable is undefined

scrollResize plug-in throws : Uncaught TypeError: DataTable is undefined

nboisteaultnboisteault Posts: 6Questions: 2Answers: 0

Description of problem:
Hi,
I have loaded the scrollResize plugin-in but it throws this error : Uncaught TypeError: DataTable is undefined.
I think the plugin does not find Datatable because I installed it with npm and it is then bundled via webpack.
How can I handle this issue?

Answers

  • nboisteaultnboisteault Posts: 6Questions: 2Answers: 0

    It is ok now after installing plugins via npm i datatables.net-plugins.

    Then in my code I have:

    import DataTable from 'datatables.net-bs5';
    import 'datatables.net-plugins/features/scrollResize/dataTables.scrollResize.mjs';
    
Sign In or Register to comment.