Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
react-material-infinite-datatable
Advanced tools
An inifite table for React that implements Material-UI as it base styles
npm install --save react-material-infinite-datatable
import React, { Component } from 'react';
import { VirtualizedTable } from 'react-infinite-datatable';
import faker from 'faker';
class MyPage extends Component {
private readonly PAGE_SIZE = 50;
generateData(pageNumber: number): Array<any> {
const rows = [];
for (let i = 0; i < this.PAGE_SIZE; i++) {
rows.push({
idx: i + (this.PAGE_SIZE * (pageNumber - 1)) + 1,
firstname: faker.name.findName(),
email: faker.internet.email(),
address: {
address1: faker.address.streetAddress()
},
arr: [{
field1: 'val1'
}]
});
}
return rows;
}
loadMoreRows = (pageNumber: number): Promise<Array<any>> => {
return new Promise(resolve => {
setTimeout(() => {
const rows = this.generateData(pageNumber);
resolve(rows);
}, 3000);
});
}
render() {
const moreRows = this.loadMoreRows.bind(this);
return (
<VirtualizedTable
pageSize={this.PAGE_SIZE}
loadData={moreRows}
selectable
columns={[
{
label: '#',
dataKey: 'idx',
type: 'number',
format: '0,0'
},
{
label: 'Name',
dataKey: 'firstname'
},
{
label: 'Email',
dataKey: 'email',
headerRenderer: (column: InfiniteColumn) => {
return (<div>{column.label + '...'}</div>);
},
renderer: (_column: InfiniteColumn, row: any) => {
return (<div>{row.email}: {row.idx}</div>)
}
},
{
label: 'Street',
dataKey: 'address.address1'
},
{
label: 'Array Value',
dataKey: 'arr[0].field1'
}
]}
/>)
}
}
FAQs
An inifite table for React that implements Material-UI as it base styles
The npm package react-material-infinite-datatable receives a total of 0 weekly downloads. As such, react-material-infinite-datatable popularity was classified as not popular.
We found that react-material-infinite-datatable 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.