
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
react-editable-table
Advanced tools
Based on: react-data-components.
npm install react-editable-table --save
The default implementation includes a filter for case insensitive global search, pagination and page size.
var React = require('react');
var DataTable = require('react-editable-table').DataTable;
var columns = [
{ title: 'Site', prop: 'site' },
{ title: 'Country', prop: 'country' },
{ title: 'Domain', prop: 'domain', validation: /^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+$/ },
{ title: 'Phone', prop: 'phone', editable: false }
];
var data = [
{ site: 'google', country: 'USA', domain: 'google.com', phone: 'phone value' }
// It also supports arrays
// [ 'name value', 'city value', 'address value', 'phone value' ]
];
React.render((
<DataTable
className="container"
keys={[ 'site' ]}
columns={columns}
initialData={data}
initialPageLength={5}
initialSortBy={{ prop: 'site', order: 'desc' }}
pageLengthOptions={[ 5, 20, 50 ]}
/>
), document.body);
See complete example.
keys: Array<string | number>
Properties that make each row unique, e.g. an id.
columns: Array<ColumnOption>
See Table
column options.
pageLengthOptions: Array<number>
initialData: Array<object | Array<any>>
initialPageLength: number
initialSortBy: { prop: string | number, order: string }
title: string
The title to display on the header.
prop: string | number
The name of the property or index on the data.
editable: boolean
Enable / Disable possibility edit property data.
render: (val: any, row: any) => any
Function to render a different component.
className: string | (val: any, row: any) => string
Class name for the td.
defaultContent: string
sortable: boolean
width: string | number
FAQs
React data components
The npm package react-editable-table receives a total of 33 weekly downloads. As such, react-editable-table popularity was classified as not popular.
We found that react-editable-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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.