Code Monkey home page Code Monkey logo

Comments (1)

matt-riemer avatar matt-riemer commented on June 26, 2024

Hey @rkbhochalya

Yea, great question! :)

So, firstly, no...I don't have any immediate plans for effective_datatables and Bootstrap4 support.

(I run a ton of client facing apps using this gem, and they're all on Bootstrap3)

When Bootstrap4 is officially launched, and hits version 1.1, I'll be moving over to it too. But that could be 6+ months.

However, the datatables.net javascript library does have support for Bootstrap4, and it's conceivable that you could make this gem work with it. Maybe in only a few hours of coding.

If you feel up to some hacking, I'd suggest the following:

1.) Download the datatables.net Bootstrap4 stylesheet, and override your app's (so it overrides this gem...) /app/assets/stylesheets/dataTables/dataTables.bootstrap.css

https://github.com/DataTables/DataTables/blob/master/media/css/dataTables.bootstrap4.css

You'll probably need to replace and override the /app/assets/stylesheets/effective_datatables/_overrides.scss file too

This will let you get the Bootstrap4 stylesheets in place.

2.) Might have to do this for javascripts too.

The bootstrap specific file is /app/assets/javascripts/dataTables/dataTables.bootstrap.js

https://github.com/DataTables/DataTables/blob/master/media/js/dataTables.bootstrap4.js

3.) And then you might need to tweak some of the = render_datatable JS options

Specifically the dom: attribute, as per

https://github.com/code-and-effect/effective_datatables/blob/master/app/assets/javascripts/effective_datatables/initialize.js.coffee#L52

which you can do by calling = render_datatable(@datatable, input_js: { dom: 'newstring' })

Feel free to ping me here for any specific issues you run into.

Accepting PRs :)

Cheers.

from effective_datatables.

Related Issues (20)

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.