Comments (3)
Hi Andi,
I agree the detail row leaves much to be desired and is really just a simple data dump of the values to HTML with no real styling added to it. This however was done on purpose as we expected people to make use of the createDetail option which is really the function used to create the detail row HTML. They could then style their custom HTML as they liked with no interference from FooTable, that said I do see your point that the default detail row needs some tender love and care so I will look into making some default styles with explicit CSS classes so they can't interfere with anything that could be added later.
The below is the default createDetail function but it shows how you could override it and create pretty much whatever you like in the detail row, as you can see at the moment this is an extremely simple HTML structure with no classes applied but you could make it do whatever you like.
$('table').footable({
createDetail: function(element, data) {
/// <summary>This function is used by FooTable to generate the detail view seen when expanding a collapsed row.</summary>
/// <param name="element">This is the div that contains all the detail row information, anything could be added to it.</param>
/// <param name="data">
/// This is an array of objects containing the cell information for the current row.
/// These objects look like the below:
/// obj = {
/// 'name': String, // The name of the column
/// 'value': Object, // The value parsed from the cell using the parsers. This could be a string, a number or whatever the parser outputs.
/// 'display': String // This is the actual HTML from the cell, so if you have images etc you want moved this is the one to use and is the default value used.
/// }
/// </param>
for (var i = 0; i < data.length; i++) {
element.append('<div><strong>' + data[i].name + '</strong> : ' + data[i].display + '</div>');
}
}
});
Thanks
Steve
EDIT:
Just wanted to add that this is the reason for the explicit selectors and CSS classes in FooTable, as much as possible is now directly targeted to avoid any FooTable CSS styles and JS selectors cascading down to the detail row.
from footable.
Hi Steve,
thanks for your fast reply!
I already use these customization options. Sure, customization is (more or less) necessary all the time to fit personal needs, but at least in my opinion a plugin should provide a good starting point to work with. Don't understand me wrong, footable is
I think I will provide some pull requests
Thanks for your work and your feedback!
from footable.
Hey Andi,
Yes, I agree with you and will add in some default styles so it's not so eye smacking with no customization. If you provide your CSS as a starting point I could work from there and add it in. I'm currently working in the Colspan branch and will make the modifications there before moving it across to the master branch.
Thanks
Steve
from footable.
Related Issues (20)
- footable v3 : How to jump to specified page
- convert regular table row to footable row?
- Iterating all visible (unfiltered) rows
- 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
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.