React Massive Table is a virtualized table component designed for managing massive datasets efficiently. It features column resizing, drag-and-drop reordering, and customizable themes, making it ideal for applications requiring high performance and user-friendly interaction. Easily integrate this powerful component into your React projects.
React Massive Table is a high-performance virtualized React component designed to handle massive datasets efficiently. It offers a range of powerful features, including column resizing, drag-and-drop functionality for reordering, multi-sort capabilities, and an optional group-by interface. With built-in support for light and dark themes through CSS variables and CSS Modules, it seamlessly adapts to different design requirements.
getRows(start, end, req) function. This can interact with memory, APIs, IndexedDB, and more.To get started, minimal, client-side rows can be created using an in-memory array. Here’s a quick usage example:
import { MassiveTable } from 'react-massive-table';
type Row = { id: number; name: string; value: number };
const data: Row[] = Array.from({ length: 100_000 }, (_, i) => ({
id: i + 1,
name: `Item ${i + 1}`,
value: Math.round(Math.random() * 1000),
}));
const columns = [
{ path: ['id'], title: 'ID', width: 80, align: 'right' },
{ path: ['name'], title: 'Name', width: 240 },
{ path: ['value'], title: 'Value', width: 140, align: 'right' },
];
function App() {
const getRows = (start: number, end: number) => ({
rows: data.slice(start, end),
total: data.length,
});
return (
<MassiveTable<Row>
getRows={getRows}
rowCount={data.length}
columns={columns}
style={{ height: '70vh', width: '100%' }}
/>
);
}
rowCount and the getRows method to fetch necessary data.For optimal performance, it is advisable to maintain stable references in the getRows function and to cache server calls when applicable. Consistent column definitions enhance the component's ability to manage column state effectively.
The repository includes comprehensive tests for verifying basic rendering and functionality, alongside a demo application to showcase the capabilities of React Massive Table.
**Explore React Massive Table to build efficient data-heavy applications with unparalleled user interactivity and customization possibilities.
No comments yet.
Sign in to be the first to comment.