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 data set 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
width
and height
are required to display the table properly
In the examples
we are using a wrapper const Table = props => <BaseTable width={720} height={400} {...props} />
to do that
You can use the AutoResizer
to make the table fill the container, take the playground for example
You have to polyfil Array.prototype.findIndex
to make it works on IE
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: $bim-font-size-small;
$table-border-radius: 4px;
$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
FAQs
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.