
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.
react-bs-datatable
Advanced tools
React Bootstrap Datatable (without jQuery) with sorting, filter, and pagination
Inspired by react-data-components. This library uses react-bootstrap stylesheets and javascripts. In addition, this library also uses font-awesome for the table header, clear filter, and other stuffs.
This is the v3 version of the library. To see the v2 version of README, please visit the v1 branch.
tsc to compile the TypeScript files to output all files to the lib folder.storiesOf, but now it is using Component Story Format (CSF), which was available starting from Storybook v5.font-awesome CSS with the React components of Font Awesome. This allowed us to enable tree shaking, which resulted in the optimization point above.Please read this guide if you are migrating from v2.
With npm:
npm install --save react-bs-datatable@3 bootstrap@5 react-bootstrap@2 @fortawesome/fontawesome-svg-core@6 @fortawesome/free-solid-svg-icons@6 @fortawesome/react-fontawesome@0
With yarn:
yarn add react-bs-datatable@3 bootstrap@5 react-bootstrap@2 @fortawesome/fontawesome-svg-core@6 @fortawesome/free-solid-svg-icons@6 @fortawesome/react-fontawesome@0
For more complete examples, please visit this sandbox link (https://codesandbox.io/s/react-bs-datatable-3-typescript-bn234b) or the Storybook demo (https://imballinst.github.io/react-bs-datatable).
import React from 'react';
import {
DatatableWrapper,
Filter,
Pagination,
PaginationOpts,
TableBody,
TableHeader
} from 'react-bs-datatable';
import { Col, Row, Table } from 'react-bootstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
// Create table headers consisting of 4 columns.
const headers = [
{ title: 'Username', prop: 'username' },
{ title: 'Name', prop: 'realname' },
{ title: 'Location', prop: 'location' }
];
// Randomize data of the table columns.
// Note that the fields are all using the `prop` field of the headers.
const body = Array.from(new Array(57), () => {
const rd = (Math.random() * 10).toFixed(1);
if (rd > 0.5) {
return {
username: 'i-am-billy',
realname: `Billy ${rd}`,
location: 'Mars'
};
}
return {
username: 'john-nhoj',
realname: `John ${rd}`,
location: 'Saturn'
};
});
// Then, use it in a component.
function TableComponent() {
return (
<DatatableWrapper body={body} headers={headers}>
<Row className="mb-4">
<Col
xs={12}
lg={4}
className="d-flex flex-col justify-content-end align-items-end"
>
<Filter />
</Col>
<Col
xs={12}
sm={6}
lg={4}
className="d-flex flex-col justify-content-lg-center align-items-center justify-content-sm-start mb-2 mb-sm-0"
>
<PaginationOpts />
</Col>
<Col
xs={12}
sm={6}
lg={4}
className="d-flex flex-col justify-content-end align-items-end"
>
<Pagination />
</Col>
</Row>
<Table>
<TableHeader />
<TableBody />
</Table>
</DatatableWrapper>
);
}
Head to https://imballinst.github.io/react-bs-datatable to see all of the features in action.
Visit the API reference for more details.
Feel free to contribute by creating issues and/or pull requests. I will do my best to address them as fast as I can. Additionally, after working on your task, since we are using changesets, please run this command:
yarn changeset
Then follow the promppt accordingly. The rule of thumb is as follows:
See license in LICENSE.
FAQs
React Bootstrap Datatable (without jQuery) with sorting, filter, and pagination
We found that react-bs-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.

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.