Giter Site home page Giter Site logo

Comments (12)

murtaza110786 avatar murtaza110786 commented on September 2, 2024

Hi,

We tried your plugin with Bootstrap 3 and it is not working. Please someone provide the resolution as this is very annoying. We are not able to use the latest upgraded Bootstrap 3 with this plugin ultimately the only option left for us is to drop either one of them in our application. Really appreciate your quick response.

from datatables-responsive.

comanche avatar comanche commented on September 2, 2024

I'll look into this.

from datatables-responsive.

comanche avatar comanche commented on September 2, 2024

The responsive helper should work with any CSS framework. I've checked in a Bootstrap 3.x example. Check out ajax-bootstrap3.html.

from datatables-responsive.

MrHubble avatar MrHubble commented on September 2, 2024

@comanche Thanks for the great gem. I am using it with jquery-datatables-rails and Bootstrap 3. It seems to be working correctly however an error is throw in the console. This does not seem to affect functionality but thought it was worth reporting.

screen shot 2014-01-23 at 3 55 03 pm

UPDATE:
Actually this does affect the functionality of other js plugins I have on the page.

from datatables-responsive.

comanche avatar comanche commented on September 2, 2024

The underscore _ refers to Lo-Dash. Did you include lodash.min.js?

from datatables-responsive.

MrHubble avatar MrHubble commented on September 2, 2024

Thanks for getting back to me.

Because I am using jquery-datatables-rails I included gem 'lodash-rails' in my gem file.

I just checked in bundle and it says it's installed:
Using lodash-rails (2.4.0)

from datatables-responsive.

MrHubble avatar MrHubble commented on September 2, 2024

I added lodash.min directly in my Rails asset pipeline and it works well without any errors. I guess the problem was with the lodash-rails.

My datatable seems to break the boundary of its container and is no longer responsive when my browser width is dragged below about 800px. Is this expected behaviour? I have tried playing with the settings as below with no noticeable changes:

 responsiveHelper = undefined
  breakpointDefinition =
    tablet: 1400
    phone: 280

from datatables-responsive.

comanche avatar comanche commented on September 2, 2024

I have not noticed the behavior you mentioned. I tried your breakbpoint definition in the Bootstrap 3 example it worked as expected.

from datatables-responsive.

MrHubble avatar MrHubble commented on September 2, 2024

Interesting stuff. Is there a jsfiddle example that you were playing with. Sometimes it's a bit hard to separate everything in a rails app and I'm not sure what you have included (what other js libraries you are using) in your test to get it working.

from datatables-responsive.

comanche avatar comanche commented on September 2, 2024

If you download the files from repo, there's a an example\ajax-bootstrap3.html file you may start with.

from datatables-responsive.

MrHubble avatar MrHubble commented on September 2, 2024

Thanks for pointing out the excellent example which works well in my local development environment.

I now see that the problem with my project is that the datatable is responsive to the point where it should remove columns dynamically, which is doesn't do and the container is broken.

I copied your js from _ajax-bootstrap3.js_* and removed the code regarding ajax and aaColumnDefs, and updated the table name to match my table name. I also copied all of the js files you are using to my project so I could ensure we are using the same versions.

After these changes my table is still not dynamically removing columns. Could you please point me to which file and which section of code is responsive for this so I can try to track it down?

Thanks.

from datatables-responsive.

comanche avatar comanche commented on September 2, 2024

First, make sure there's no conflict with other JavaScript code. datatables.responsive.js makes use of the $.

If you have everything configure properly, ResponsiveDatatablesHelper.prototype.respond (line 255) should be called when you resize your window.

ResponsiveDatatablesHelper.prototype.showHideColumns (line 327) actually shows or hides the columns.

Hopefully that'll help get you started.

from datatables-responsive.

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.