npm package select-bs4

npm package select-bs4

SavinienSavinien Posts: 12Questions: 6Answers: 1

Hello,

Firstly: is it possible, that ths npm-package select-bs4 is missing the js-directory? I tried it wih forced downloads, but the directory is still not there.

Secondarly: I seem to not get the bs4-css to be included via required. Is there a trick I need to do, like order or other parameters to get datatables.net to realize that there is a datatables.net-bs4 as well, which it should use?

Thank you very much for any help
Rüdiger

This question has an accepted answers - jump to answer

Answers

  • SavinienSavinien Posts: 12Questions: 6Answers: 1

    I do know that select is a css-only package, I thought that there might be some minor js required, because I get this error message, as soon as I require the select-bs4:

    ./src/components/helper/DataTables.js
    Module not found: Can't resolve 'datatables.net-select-bs4' in '(...)/frontend/src/components/helper'
    

    All the other datatables.net imports work fine

  • SavinienSavinien Posts: 12Questions: 6Answers: 1

    Just in case there is another dummy like me on the loose here, I figured both out on my own, as they seem to be the same propblem after all. css-files are not automatically included in the bundle, they have to be required separately. So for the datatables.net-bs4 this should look like:

    require('datatables.net-select-bs4/css/select.bootstrap4.min.css');
    

    Good night and thanks for this great library. o:)

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    Hi,

    Thanks for the updates! I completely concur that this is confusing!

    To that end, I've actually committed Javascript as a very simple little wrapper for Select and the other libraries where the styling integration needs only CSS to add a small piece of Javascript letting module resolvers run through it correctly.

    That's in git at the moment and will be included in the next release of all of the extensions for DataTables!

    Regards,
    Allan

This discussion has been closed.