Giter Club home page Giter Club logo

Comments (5)

 avatar commented on July 2, 2024

I don't quite understand I'm afraid - you want the table to be as high as the number of rows in a page - but to do paging still? Wouldn't that just be the no scrolling situation with paging enabled?

One thing to note, you can't use the paging controls in a table with Scroller enabled. You need to have scrolling enabled, but you can let the user pick the page, since Scroller uses the paging abilities internally.

from scroller.

nesl247 avatar nesl247 commented on July 2, 2024

When using DataTables without Scroller, the height of the table is like any standard table, it's the height of all the rows combined. When using Scroller, I have to specify scrollY.

I want to be able to use Scroller, but let the height be automatic based on the "currently displayed rows". So basically scrollY would be equal to the height of all of the rows based on the current length option. So if length is set to 10, and each row is 50px high, then the height that would be used instead of scrollY would be 50x10, or 500px.

from scroller.

 avatar commented on July 2, 2024

I see - in which case do scrollY: $('#myTable tbody tr:eq(0)').height() * 10.

from scroller.

nesl247 avatar nesl247 commented on July 2, 2024

The problem is what happens if the user decides to change the length? That's why a scrollY: 'length' would be nice.

Otherwise you have to add code to listen on length changes, then change the table height (unless there is an actual function to call to resize the table using DataTables height calculations?).

from scroller.

nesl247 avatar nesl247 commented on July 2, 2024

Stupid me.. This is what happens when I'm coding and submit a feature request at the same time.

from scroller.

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.