Comments (11)
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.
:-)
from footable.
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.
+1 on working with rowspan
from footable.
Agreed, would be very helpful!
from footable.
đ Is anyone already working on this?
from footable.
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.
+1 on working with rowspan
from footable.
+1 on adding this feature
from footable.
@steveush was this fixed/implemented?
from footable.
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)
- Multiple dropdown filters HOT 1
- Footable v3 - Button only fired first Page
- Get footable object HOT 2
- What to sponsor this project HOT 2
- server side paginating HOT 3
- bootstrap 4 support please!
- Hide columns once moved to small devices HOT 1
- collapse all rows on load HOT 1
- Append new row when api detect income data
- Exact Query with space in filter on dropdown
- Footable with jQuery 3.x is very slow - with 2.x is fast HOT 1
- Deactivate footable to <tr>
- Abandoned? HOT 2
- Search a string with "_" and "-" does not work
- Search values with "&" inside
- Thousands comma separator not showing HOT 2
- i am using footable with raw html , i want to add new button to each row but the buttons couldnt track the event handlers neither the post request ! HOT 1
- Redraw table, data has changed
- footable bug in rowupdating event HOT 1
- React issue: Each child in a list should have a unique "key" prop. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from footable.