
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
javascript-table
Advanced tools
Dynamic Table Generator is a versatile JavaScript package designed to simplify the process of creating interactive tables from data sets. Built with core JavaScript, it offers compatibility with any JavaScript library, providing flexibility and ease of in
javascript-table is a versatile JavaScript package designed to simplify the process of creating interactive tables from data sets. Built with core JavaScript, it offers compatibility with any JavaScript library, providing flexibility and ease of integration into various projects.
import Table from "javascript-table";
const idOfHTMLElement = "my-tickets-table"; // html id of the table parent where the table will be rendered.
const columns = [
{
label: "ID",
key: "index",
renderCallback: (key: any, row: any) => {
function handleClickButtonInfo(event: any) {
console.log({ key, row });
}
const buttonElement = document.createElement("button");
buttonElement.innerHTML = row.status;
buttonElement.addEventListener(
"click",
handleClickButtonInfo.bind(this)
);
return buttonElement;
},
},
{
label: "Requester Name",
key: "requesterName",
},
{
label: "Subjects",
key: "subject",
}
]
const data = [
{
index: "#27",
requesterName: "Rodney Artichoke",
subject: "I need help with aading a New Contact...."
},
{
index: "#39",
requesterName: "Chaplain Mondover",
subject: "I need help with aading a New Contact data to be pre...",
},
{
index: "#47",
requesterName: "Rodney Artichoke",
subject: "Mobile Campaign"
},
{
index: "#52",
requesterName: "Inverness McKenzie",
subject: "Service related announcements"
},
{
index: "#87",
requesterName: "Douglas Lyphe",
subject: "I need help with aading a New Contact...."
},
{
index: "#92",
requesterName: "Theodore Handle",
subject: "Adding a payment methods"
},
{
index: "#27",
requesterName: "Rodney Artichoke",
subject: "I need help with aading a New Contact...."
}
]
const perPageLimit = 5; // Shows 5 rows per page. By default 10
const visiblecheckboxStatus = true; // Shows checkboxes in rows. By default true
const cssClasses = {
table: "ticket-tabel", // CSS class for table. You can add your own class as per your css changes
tableParent: "tickets-tabel", // CSS class for the immidiate parent of Table
parentClass: "all-support-ticket-tabel", // CSS class for main parent
};
const showingLine = "Showing %start% to %end% of %total% Tickets" // It will render a line above table with given text
const dark = true; // Dark theme
const options = {
perPageLimit,
visiblecheckboxStatus,
tableClasses: cssClasses,
showingLine,
dark
};
const handleCheckbox = (selectedRows) => {
console.log(selectedRows)
} // selectedRows will get list of row with content which user have selected on clicked checkbox in table
const table = new Table(idOfHTMLElement, {
columns: columns,
data: data
},
options,
handleCheckbox, // callback for handle selected rows in table
);
FAQs
Dynamic Table Generator is a versatile JavaScript package designed to simplify the process of creating interactive tables from data sets. Built with core JavaScript, it offers compatibility with any JavaScript library, providing flexibility and ease of in
The npm package javascript-table receives a total of 3 weekly downloads. As such, javascript-table popularity was classified as not popular.
We found that javascript-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.