Not loaded properly Bootstrap 5 datatable

Not loaded properly Bootstrap 5 datatable

tsurubasotsurubaso Posts: 32Questions: 8Answers: 0

Link to test case:
It's a Electron app then no Online example.

Error messages shown:
dataTables.bootstrap5.js:47 Uncaught TypeError: Cannot read properties of undefined (reading 'defaults')
at dataTables.bootstrap5.js:47:27
at dataTables.bootstrap5.js:39:3
at dataTables.bootstrap5.js:41:2

On my Index.html

  <link rel="stylesheet" type="text/css" href="./node_modules/datatables.net-bs5/css/dataTables.bootstrap5.css">

  <script type="text/javascript" src="./node_modules/datatables.net-bs5/js/dataTables.bootstrap5.js"></script>

There must be some non recognition of Jquery or Bootstrap 5.
Little lost on what to do.

Answers

  • tsurubasotsurubaso Posts: 32Questions: 8Answers: 0

    To tell the truth...
    by different testings...
    with this combination
    <link rel="stylesheet" type="text/css" href="./node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css" />
    <script type="text/javascript" src="./node_modules/datatables.net/js/jquery.dataTables.min.js"></script>

    I have no error, but clearly, there is problems. That does not look like to be the proper way.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    We would really need to see this to progress it. You've posted in the past with working tables using Electron, so it would be worth comparing the ordering of the sources with those earlier projects,

    Colin

  • tsurubasotsurubaso Posts: 32Questions: 8Answers: 0
    edited May 2022

    Dear Colin,
    Thanks to answer.
    A quick word, I will try to post later on the artefacts that I have, those must be bugs but the thing is working fine except that.
    For the progress between the past and present version, I will be unable to show you any.
    Any try to use the proper Bootstrap version 5 datatable was unsuccessful then I stuck to what I found some years ago, the elements put in the comment after my question.
    :)
    Edit: by the way, good memory!...I made something like 3 posts...

Sign In or Register to comment.