Does the npm install for the editor include the select extension?

Does the npm install for the editor include the select extension?

ozolsonozolson Posts: 3Questions: 1Answers: 0

I installed the editor using npm and my package.json file includes "@datatables.net/editor-bs5": "^2.4.0" under dependencies. Does this package include the select extension or do I need to install that using npm too?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin
    Answer ✓

    Editor isn't technically dependent on Select, so it doesn't install automatically (it is however almost always used!).

    You need to include datatables.net-select-bs5 as well.

    Allan

  • ozolsonozolson Posts: 3Questions: 1Answers: 0

    Ok thank you.

  • ozolsonozolson Posts: 3Questions: 1Answers: 0

    Does this mean I need to include any css imports for select? Im currently importing
    @import "@datatables.net/editor-bs5/css/editor.bootstrap5.css"; In my main .scss file.

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    Yes, you'll need imports for the CSS for DataTables core, Editor and any other extensions you are using.

    Depending on how your build is configured you might be able to simply do:

    @import 'datatables.net-bs5';
    @import 'datatables.net-editor-bs5';
    @import 'datatables.net-buttons-bs5';
    @import 'datatables.net-select-bs5';
    

    Allan

Sign In or Register to comment.