
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ReactJS controls: Data table by Kraken team!
npm install --save krc-table
import 'krc-table/styles.css';
import { DataTable } from "krc-table";
import 'krc-table/styles.css';
const customProductPrice = (item) => {
return Number(item.price.toFixed(1)).toLocaleString();
}
const selectedProductHeaders: any[] = [
{
text: "Id",
binding: "id"
},
{
text: "Full Name",
binding: "name"
},
{
text: "Description",
binding: "description"
},
{
text: "Origin Price",
binding: "price",
template: customProductPrice
}
];
const selectedProductActions = [
{
type: "Update",
className: "btn btn-primary btn-sm",
emitBinding: "id" // emit item id when firing
},
{
type: "Delete",
className: "btn btn-danger btn-sm",
emitBinding: "id" //// emit item id when firing
}
];
const products = "products": [
{
"id": 1,
"name": "Produdct 1",
"description": "description",
"image": "https://img.theculturetrip.com/x/smart/wp-content/uploads/2018/03/cosmetics.jpg",
"price": 500000
},
{
"id": 2,
"name": "Produdct 2",
"description": "description",
"image": "https://img.theculturetrip.com/x/smart/wp-content/uploads/2018/03/cosmetics.jpg",
"price": 50
},
{
"id": 3,
"name": "Produdct 3",
"description": "description",
"image": "https://img.theculturetrip.com/x/smart/wp-content/uploads/2018/03/cosmetics.jpg",
"price": 50
},
];
const pageSize = 2;
const pageCount = Math.floor(products.length / pageSize) + (products.length % pageSize === 0 ? 0 : 1);
onActionClick = e => {
if ("Update" === e.type) {
console.log("update item click", e);
}
if ("Delete" === e.type) {
console.log("delete item click", e);
}
};
// paging select new page
onPageChanged = page => {
console.log("click new paging ", page);
};
<DataTable
headers={selectedProductHeaders}
dataSources={products}
pageCount={pageCount}
rowActions={selectedProductActions}
onActionClick={onActionClick}
onPageChanged={onPageChanged}
/>
| Name | Type | Default | Description |
|---|---|---|---|
| headers | Object[] | [] | Items templates define header and binding |
| rowActions | Object[] | [] | Item actions definitions |
| dataSources | Object[] | [] | Data items |
| pageCount | number | 1 | Total page view counts for paging |
| onActionClick | Function | null | Item action click handler |
| onPageChanged | Function | null | Select new page change handler |
krc-table is released under the MIT license.
FAQs
Kraken react controls - data table
We found that krc-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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.