Giter VIP home page Giter VIP logo

Comments (9)

AllanJard avatar AllanJard commented on June 6, 2024 1

https://cdnjs.com/libraries/datatables.net-bs5 is where to get the styling integration of DataTables with Bootstrap 5.

If that isn't working for you, please link to a test case showing the issue. You need to include DataTables core and then the Bootstrap 5 integration for DataTables.

from dist-datatables-bootstrap5.

AllanJard avatar AllanJard commented on June 6, 2024 1

The DataTables core file can be augmented by various style files. The download builder I mentioned before is the easiest way of getting a list of all the files you need, even if you don't use our CDN.

from dist-datatables-bootstrap5.

AllanJard avatar AllanJard commented on June 6, 2024

Sorry about that. I've been working on the build scripts and messed up a bit. The dependencies are back in place now. More work to be done (typing for example) but getting there. Going to close this specific issue as fixed.

from dist-datatables-bootstrap5.

pickfire avatar pickfire commented on June 6, 2024

Is there a release for it? But so far I tested with the current cdnjs dependency it still didn't seemed to work. I still don't see jquery.dataTables.min.js in https://github.com/DataTables/Dist-DataTables-Bootstrap5/tree/master/js and I still get the error

Uncaught TypeError: DataTable is undefined

from dist-datatables-bootstrap5.

AllanJard avatar AllanJard commented on June 6, 2024

jquery.dataTables.min.js is in https://github.com/DataTables/Dist-DataTables/tree/master/js . That is expected - this package as a dependency on that one if you are using npm / yarn. If you are using CDNJS then yes, you need to include the JS files from both packages. Our download builder can help with that. It doesn't use CDNJS, but it can help show what files you need (deselect the concat option). There isn't yet a release - that will be coming in the next week or so.

from dist-datatables-bootstrap5.

pickfire avatar pickfire commented on June 6, 2024

jquery.dataTables.min.js is in https://github.com/DataTables/Dist-DataTables/tree/master/js . That is expected - this package as a dependency on that one if you are using npm / yarn. If you are using CDNJS then yes, you need to include the JS files from both packages. Our download builder can help with that. It doesn't use CDNJS, but it can help show what files you need (deselect the concat option). There isn't yet a release - that will be coming in the next week or so.

I did include a newer jquery but it doesn't seemed to work either. Do I have to include the older jquery 1.5 for it to work manually from another source? download builder works but we do want to use dependencies from cdnjs, currently we use datatables cdn but ideally we don't want to have a separate cdn just for this use case.

from dist-datatables-bootstrap5.

AllanJard avatar AllanJard commented on June 6, 2024

jQuery 1.7.1 or newer (ideally 3.x) is required for DataTables. If you want to load DataTables core from CDNJS use https://cdnjs.com/libraries/datatables.net .

from dist-datatables-bootstrap5.

pickfire avatar pickfire commented on June 6, 2024

https://cdnjs.com/libraries/datatables.net does work, but it does not seem to have bootstrap 5 styling

I tried using https://cdnjs.cloudflare.com/ajax/libs/datatables.net-bs5/1.12.1/dataTables.bootstrap5.css in additional to that, but it also doesn't work.

from dist-datatables-bootstrap5.

pickfire avatar pickfire commented on June 6, 2024

Thanks, nice it works now. I didn't know I can combine both js. I thought the datatables.net already includes all the required js.

from dist-datatables-bootstrap5.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.