JavaScript Table/Grid library
npm install table4jsTable widget shows data in table (grid) form. It supports infinite scrolling, array datasets, sever-side data provider, filtering, sorting and columns summary. Widget allows to modify data via inplace editing, create and delete rows.
Shows data in table (grid) form. Supports infinite scrolling, array datasets, sever-side data provider, filtering, sorting and columns summary. Allows to modify data via inplace editing, create and delete rows.
Add the following scripts to HEAD part of your HTML file
``HTML`
Add the following markup to BODY part of your HTML file - where you want to see a table
`HTML`
Add the following script to make it work
`JS
var options = {
enableSearch: true,
enableSummary: true,
columns: [
{
name: "word",
title: "Word"
},
{
name: "num",
title: "Number",
type: "number"
},
{
name: "text",
title: "Text",
}
],
};
var model = new Table4JS.Table(options);
var sampleData = [
{ word: "here ", num: 5, text: "O gentlemen, there is no need for you to confess your happiness, no one requires you to confess - who does not know your modesty!" },
{ word: "there ", num: 24, text: "Their bearing, although they were not completely calm, with its ease, full of dignity and humility at the same time, aroused admiration" },
{ word: "there ", num: 18, text: "I'm to blame, I'm to blame, because I choose my own people." }
];
model.data = sampleData;
model.render("#table-container");
``
Here is the table4js live example with the above code
The demos are framework-specific and you can choose your framework via selector Standalone/Knockout/React in the top left corner of the navigation panel. Each demo has html/js/css tab where you can get markup, css or JavaScript code to use in your application. Each demo also can be opened in a separate window.