Code Monkey home page Code Monkey logo

Comments (11)

steveush avatar steveush commented on May 31, 2024

Hi dhanlon,

Currently FooTable has no support for rowspans but it is something I could look into for a future update however this would probably only happen after paging support is released.

Thanks
Steve

from footable.

Anke avatar Anke commented on May 31, 2024

:-)

from footable.

roguemonkey avatar roguemonkey commented on May 31, 2024

I'd like to also "vote" on this issue, if possible. Rowspan in the headers would make some layouts a lot nicer to look at, but unfortunately, it doesn't work.

from footable.

MarFan avatar MarFan commented on May 31, 2024

+1 on working with rowspan

from footable.

yacobell avatar yacobell commented on May 31, 2024

Agreed, would be very helpful!

from footable.

kmindi avatar kmindi commented on May 31, 2024

👍 Is anyone already working on this?

from footable.

SLemming avatar SLemming commented on May 31, 2024

Hi,

I would like a solution in the footable plugin (really great plugin btw), but since there isn't one yet, I decided to script a solution on my own. It's only working on table headers now, but perhaps you can change it to your own needs.

Just set rowspan to the upper row like this:

<thead>
    <tr class="footable-group-row">
        <th class="head" rowspan="2">Stahlsorten</th>
        <th class="head" rowspan="2">Normbezeichnung</th>
        <th colspan="2" class="left" data-group="Oberflächenveredelungen">Oberflächenveredelungen</th>
    </tr>

    <tr>
        <th class="head" data-class="head">Stahlsorten</th>
        <th class="head" data-toggle="true" data-class="head">Normbezeichnung</th>
        <th data-hide="phone" data-group="Oberflächenveredelungen">ZE</th>
        <th data-hide="phone" data-group="Oberflächenveredelungen">Z</th>
    </tr>
</thead>

And then hide the other cells via JS.

$table.on('footable_breakpoint', function(data) {
                // rowspan: hide other headers
                $table.find('th[rowspan]').each(function() {
                    var $th = $(this),
                        index = $th.index(),
                        rowspan = $th.attr('rowspan');

                    // get all cells in the next rows (dependend on the rowspan-value) and hide them
                    $th.parent('tr').nextAll('tr:lt(' + rowspan + ')')
                        .find('th:eq(' + index + ')').hide();
                });
            })
            .footable();

I used the breakpoint event because with it I can detect display changes on the element.

It's not a perfect solution and maybe it's not working in all cases, but I hope I can help someone.

from footable.

ClubWebware avatar ClubWebware commented on May 31, 2024

+1 on working with rowspan

from footable.

ehsan6sha avatar ehsan6sha commented on May 31, 2024

+1 on adding this feature

from footable.

kmindi avatar kmindi commented on May 31, 2024

@steveush was this fixed/implemented?

from footable.

steveush avatar steveush commented on May 31, 2024

Hi,

V2 is no longer supported and it sat for a very long time and so issues just built up. Seeing as V3 has been the default branch for quite a while now (over a year) and development is continuing on it I am bulk closing all old V2 issues in an attempt to cleanup the repo a bit. I will also be going through the old pull requests and possibly removing the entire V2 branch as it is stagnant and just causes confusion.

As for if this has been implemented in V3, no it has not. V3 was designed to fill the gap between having to roll your own for simple tables and having to implement https://datatables.net/, seeing as they have copied the way the row collapsing works from FooTable they are a very good solution to use for more complex table layouts or for full ajax support.

Thanks

from footable.

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.