rc-table is a foundational UI component for React applications, designed to provide comprehensive table functionalities without imposing specific styling. It serves as a highly customizable base for building complex data grid interfaces, allowing developers to integrate their own design systems. The current stable version is 7.55.1. The project demonstrates an active release cadence, frequently publishing patch and minor versions to address bugs and introduce new features. Key differentiators include its unopinionated nature regarding aesthetics, offering full control over presentation, while providing robust features such as fixed headers, expandable rows, virtual scrolling (since v1.9.0 of the underlying `@rc-component/table`), and a flexible API for columns and data manipulation.
npm install rc-tableVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to render a basic table with defined columns and data using rc-table in a React TypeScript environment, including type definitions.
Review your table implementations that might be affected by changes to `MeasureRow` or unique identifiers. If the `v7.55.0` fix was critical for your use case, consider staying on `v7.55.0` if possible, or implementing a custom workaround. Monitor future releases for a re-introduction of the fix.
Ensure all `columns` objects include a `width` property with a numerical value (e.g., `width: 100`) when `useFixedHeader` is `true` or `scroll` is configured.
When upgrading `rc-table`, carefully review the changelog for any mentions of `@rc-component/table` or significant internal refactors. Be prepared for potential future updates to peer dependencies or a migration to the `@rc-component/table` package if it becomes the primary offering.
Use `import Table from 'rc-table';` for ES modules. For CommonJS, use `const Table = require('rc-table');` (without curly braces).Ensure both the `columns` and `data` props are always provided as valid array types, even if empty (e.g., `columns={[]} data={[]}`). Check for asynchronous data loading that might initially render the table with undefined props.Add a `width` property to every column definition in your `columns` array when using fixed headers or scrolling. For example: `{ title: 'Name', dataIndex: 'name', width: 150 }`.