Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
react-base-table
Advanced tools
a react table component to display large data set with high performance and flexibility
BaseTable is a react table component to display large datasets with high performance and flexibility
# npm
npm install react-base-table --save
# yarn
yarn add react-base-table
import BaseTable, { Column } from 'react-base-table'
import 'react-base-table/styles.css'
...
<BaseTable data={data} width={600} height={400}>
<Column key="col0" dataKey="col0" width={100} />
<Column key="col1" dataKey="col1" width={100} />
...
</BaseTable>
...
Learn more at the website
Make sure each item in data
is unique by a key, the default key is id
, you can customize it via rowKey
width
and height
are required to display the table properly
In the examples
we are using a wrapper const Table = props => <BaseTable width={700} height={400} {...props} />
to do that
If you want it responsive, you can use the AutoResizer
to make the table fill the container, checkout the Auto Resize example
BaseTable
is well tested on all modern browsers and IE11. You have to polyfill Array.prototype.findIndex
to make it works on IE
The examples don't work on IE as they are powered by react-runner which is a react-live
like library but only for modern browsers.
BaseTable is designed to be the base component to build your own complex table component
The simplest way is overriding the default styles (assuming you are using scss
)
// override default variables for BaseTable
$table-prefix: AdvanceTable;
$table-font-size: 13px;
$table-padding-left: 15px;
$table-padding-right: 15px;
$column-padding: 7.5px;
...
$show-frozen-rows-shadow: false;
$show-frozen-columns-shadow: true;
@import '~react-base-table/es/_BaseTable.scss';
.#{$table-prefix} {
&:not(.#{$table-prefix}--show-left-shadow) {
.#{$table-prefix}__table-frozen-left {
box-shadow: none;
}
}
&:not(.#{$table-prefix}--show-right-shadow) {
.#{$table-prefix}__table-frozen-right {
box-shadow: none;
}
}
...
}
You can write your own styles from scratch or use CSS-in-JS solutions to achieve that
<BaseTable
classPrefix="AdvanceTable"
components={{
TableCell: AdvanceTableCell,
TableHeaderCell: AdvanceTableHeaderCell,
ExpandIcon: AdvanceExpandIcon,
SortIndicator: AdvanceSortIndicator,
}}
...
/>
There are a lot of highly flexible props like xxxRenderer
and xxxProps
for you to build your own table component, please check the api and examples for more details
We are using a advanced table component based on BaseTable
internally, with much more features, including row selection, row grouping, data aggregation, column settings, column reordering, and column grouping, tooltip, inline editing.
Please check guidelines for more details
v1.8.1 (2019-09-23)
unflatten
should not override the existing childrenFAQs
a react table component to display large data set with high performance and flexibility
The npm package react-base-table receives a total of 12,693 weekly downloads. As such, react-base-table popularity was classified as popular.
We found that react-base-table demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.