a-x- / table-builder Goto Github PK
View Code? Open in Web Editor NEWIsomorphic (universal) Powerful HTML table builder based on the JSON.
Home Page: https://www.npmjs.com/package/table-builder
Isomorphic (universal) Powerful HTML table builder based on the JSON.
Home Page: https://www.npmjs.com/package/table-builder
It does not work in browser, I have added the tablebuilder.js to my assets, copied from node_modules as you describe. I get Uncaught ReferenceError: Table is not defined
Call is (new Table({ 'class': 'some-table' })) .setHeaders(headers).setData(data).render()
Thanks for this library! I was thinking of building it myself but you've gotten off to a good start.
I'd like to contribute, but just have a small request for now so I'll paste it as an issue.
In your buildFooter
function, if no totals are used, there is a blank <tfoot></tfoot>
added. This doesn't look great on tables with borders as it appears to be a blank row. Add this patch to the buildFooter
function to return an empty string:
if (content.length > 2) {
return '<tfoot><tr>' + content.join('') + '</tr></tfoot>';
} else {
return ''
}
This is such a beautiful library, thank you. Noticed that the class names for the td
cells substitue underscores in the property name to hyphens.
In my data, the property name is mla_name
but in the html I can see the td class set to mla-name-td
It would be a lot more convenient if the property name mla_name
was preserved as the class names for consistency.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.