Styles not working 100% when I use 'datatables.net-bs4' (NPM)

Styles not working 100% when I use 'datatables.net-bs4' (NPM)

dt2018dt2018 Posts: 3Questions: 1Answers: 0

Hi,

I have a Vue project and I'm importing 'datatables.net-bs4' in my app.js.
import dt from 'datatables.net-bs4'

DataTables works just fine but I noticed that some styles doesn't work/show. For example the sorting arrows.

When I include <link href="https://cdn.datatables.net/1.10.18/css/dataTables.bootstrap4.min.css" rel="stylesheet"> I get the correct styling and everything looks good. I thought that the css was included in the package I downloaded through NPM? How do I get the styling from the file with NPM?

This question has an accepted answers - jump to answer

Answers

  • dt2018dt2018 Posts: 3Questions: 1Answers: 0

    Help a brother out!

  • colincolin Posts: 15,144Questions: 1Answers: 2,586
    Answer ✓

    Hi @dt2018 ,

    This thread should help, it's asking the same thing.

    Cheers,

    Colin

  • dt2018dt2018 Posts: 3Questions: 1Answers: 0

    My man! Thank you @colin , the answer lies within the thread.

    It's like Jesus said, “Ask and you will receive, and your joy will be complete”.

  • ayzayz Posts: 51Questions: 18Answers: 0

    @dt2018: I would love to use DT in a vue app, wrapping into a component. How’d get this done?

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    Hi @ayz ,

    This thread might help, it's discussing Vue.js,

    Cheers,

    Colin

This discussion has been closed.