{"name":"rc-table","version":"7.52.1","keywords":["react","react-table","table","component","ui"],"license":"MIT","_id":"rc-table@7.52.1","maintainers":[{"name":"benjycui","email":"benjytrys@gmail.com"},{"name":"yesmeck","email":"yesmeck@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"yiminghe","email":"yiminghe@gmail.com"},{"name":"dxq613","email":"dxq613@gmail.com"},{"name":"paranoidjk","email":"hust2012jiangkai@gmail.com"},{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"xrkffgg","email":"xrkffgg@hotmail.com"},{"name":"madccc","email":"1075746765@qq.com"}],"homepage":"http://github.com/react-component/table","bugs":{"url":"http://github.com/react-component/table/issues"},"dist":{"shasum":"1ba9b6eac1dafeb6d12652e2983d82a64bc92b31","tarball":"http://registry-npm.ywwl.com/rc-table/download/rc-table-7.52.1.tgz","fileCount":200,"integrity":"sha512-ZmnwajqCkAj8fcJ9DeA0NdM57Z5qa3KqHIyIBvNLGdcuwL6rqUupxITr+y0k1vrqYpeHp8nDcuG5pet+9q2WcQ==","signatures":[{"sig":"MEQCIFs5beg9cfG/dPIZvwu1EqPmaLtroHg/dLBM5eWseDbvAiBK07q4LzmYG5IyqIzXA+IUSU89ayRKCfqc7UsJJFiRaQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":413248,"size":64245,"noattachment":false,"key":"/rc-table/-/rc-table-7.52.1.tgz"},"main":"./lib/index","types":"./lib/index.d.ts","module":"./es/index","engines":{"node":">=8.x"},"gitHead":"9fd05efc581f389f7c692d7ccd8c0041e046660d","scripts":{"tsc":"tsc -p tsconfig.json --noEmit","lint":"eslint src/ --ext .tsx,.ts","test":"vitest --watch false","start":"dumi dev","deploy":"npm run docs:build && npm run docs:deploy","compile":"father build && lessc assets/index.less assets/index.css","prepare":"husky install","coverage":"vitest run --coverage","prettier":"prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"","now-build":"npm run docs:build","docs:build":"dumi build","docs:deploy":"gh-pages -d .doc","prepublishOnly":"npm run compile && np --no-cleanup --yolo --no-publish --any-branch"},"_npmUser":{"name":"afc163","email":"afc163@gmail.com"},"repository":{"url":"git+ssh://git@github.com/react-component/table.git","type":"git"},"_npmVersion":"10.8.3","description":"table ui component for react","directories":{},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write"]},"_nodeVersion":"22.8.0","dependencies":{"rc-util":"^5.44.3","classnames":"^2.2.5","@babel/runtime":"^7.10.1","rc-virtual-list":"^3.14.2","rc-resize-observer":"^1.1.0","@rc-component/context":"^1.4.0"},"_hasShrinkwrap":false,"devDependencies":{"np":"^10.0.1","dumi":"^2.1.3","glob":"^7.1.6","less":"^4.1.3","husky":"^9.0.11","jsdom":"^25.0.0","react":"^16.0.0","enzyme":"^3.1.0","eslint":"^8.54.0","father":"^4.0.0","vitest":"^2.0.5","cheerio":"1.0.0-rc.12","rc-menu":"~9.13.0","gh-pages":"^6.1.0","prettier":"^3.1.0","cross-env":"^7.0.0","react-dnd":"^2.5.4","react-dom":"^16.0.0","rc-animate":"^3.0.0","rc-tooltip":"^6.2.0","typescript":"~5.7.2","@types/jest":"^29.5.0","lint-staged":"^15.1.0","rc-dropdown":"~4.0.1","@types/react":"^18.0.28","react-window":"^1.8.5","@types/enzyme":"^3.10.5","@umijs/fabric":"^4.0.1","enzyme-to-json":"^3.1.2","react-resizable":"^3.0.5","@types/react-dom":"^18.0.5","react-virtualized":"^9.12.0","styled-components":"^6.1.1","eslint-plugin-jest":"^28.2.0","@types/responselike":"^1.0.0","@vitest/coverage-v8":"^2.0.5","immutability-helper":"^3.0.0","regenerator-runtime":"^0.14.0","eslint-plugin-unicorn":"^56.0.0","@testing-library/react":"^12.1.5","enzyme-adapter-react-16":"^1.0.1","react-dnd-html5-backend":"^2.5.4","@types/styled-components":"^5.1.32","@testing-library/jest-dom":"^6.4.0","@rc-component/father-plugin":"^1.0.2"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rc-table_7.52.1_1756452632028_0.173466482784153","host":"s3://npm-registry-packages-npm-production"},"readme":"# rc-table\n\nReact table component with useful functions.\n\n[![NPM version][npm-image]][npm-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![build status][github-actions-image]][github-actions-url] [![Test coverage][codecov-image]][codecov-url] [![npm download][download-image]][download-url] [![bundle size][bundlephobia-image]][bundlephobia-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-table.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-table\n[github-actions-image]: https://github.com/react-component/table/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/table/actions\n[coveralls-image]: https://img.shields.io/coveralls/react-component/table.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/react-component/table?branch=master\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/table/master.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/react-component/table/branch/master\n[david-url]: https://david-dm.org/react-component/table\n[david-image]: https://david-dm.org/react-component/table/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/table?type=dev\n[david-dev-image]: https://david-dm.org/react-component/table/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-table.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-table\n[bundlephobia-url]: https://bundlephobia.com/result?p=rc-table\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-table\n\n## install\n\n[![rc-table](https://nodei.co/npm/rc-table.png)](https://npmjs.org/package/rc-table)\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nhttps://table-react-component.vercel.app/\n\n## Usage\n\n```js\nimport Table from 'rc-table';\n\nconst columns = [\n  {\n    title: 'Name',\n    dataIndex: 'name',\n    key: 'name',\n    width: 100,\n  },\n  {\n    title: 'Age',\n    dataIndex: 'age',\n    key: 'age',\n    width: 100,\n  },\n  {\n    title: 'Address',\n    dataIndex: 'address',\n    key: 'address',\n    width: 200,\n  },\n  {\n    title: 'Operations',\n    dataIndex: '',\n    key: 'operations',\n    render: () => <a href=\"#\">Delete</a>,\n  },\n];\n\nconst data = [\n  { name: 'Jack', age: 28, address: 'some where', key: '1' },\n  { name: 'Rose', age: 36, address: 'some where', key: '2' },\n];\n\nReact.render(<Table columns={columns} data={data} />, mountNode);\n```\n\n## API\n\n### Properties\n\n| Name | Type | Default | Description |\n| --- | --- | --- | --- |\n| tableLayout | `auto` \\| `fixed` | `auto` \\| `fixed` for any columns is fixed or ellipsis or header is fixed | https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout |\n| prefixCls | String | rc-table |  |\n| className | String |  | additional className |\n| id | String |  | identifier of the container div |\n| useFixedHeader | Boolean | false | whether use separator table for header. better set width for columns |\n| scroll | Object | {x: false, y: false} | whether table can be scroll in x/y direction, `x` or `y` can be a number that indicated the width and height of table body |\n| expandable | Object |  | Config expand props |\n| expandable.defaultExpandAllRows | Boolean | false | Expand All Rows initially |\n| expandable.defaultExpandedRowKeys | String[] | [] | initial expanded rows keys |\n| expandable.expandedRowKeys | String[] |  | current expanded rows keys |\n| expandable.expandedRowRender | Function(recode, index, indent, expanded):ReactNode |  | Content render to expanded row |\n| expandable.expandedRowClassName | `string` \\| `(recode, index, indent) => string` |  | get expanded row's className |\n| expandable.expandRowByClick | boolean |  | Support expand by click row |\n| expandable.expandIconColumnIndex | Number | 0 | The index of expandIcon which column will be inserted when expandIconAsCell is false |\n| expandable.expandIcon | props => ReactNode |  | Customize expand icon |\n| expandable.indentSize | Number | 15 | indentSize for every level of data.i.children, better using with column.width specified |\n| expandable.rowExpandable | (record) => boolean |  | Config row support expandable |\n| expandable.onExpand | Function(expanded, record) |  | function to call when click expand icon |\n| expandable.onExpandedRowsChange | Function(expandedRows) |  | function to call when the expanded rows change |\n| expandable.fixed | String \\| Boolean | - | this expand icon will be fixed when table scroll horizontally: true or `left` or `right` and `expandIconColumnIndex` need to stay first or last |\n| rowKey | string or Function(record, index):string | 'key' | If rowKey is string, `record[rowKey]` will be used as key. If rowKey is function, the return value of `rowKey(record, index)` will be use as key. |\n| rowClassName | string or Function(record, index, indent):string |  | get row's className |\n| rowRef | Function(record, index, indent):string |  | get row's ref key |\n| data | Object[] |  | data record array to be rendered |\n| onRow | Function(record, index) |  | Set custom props per each row. |\n| onHeaderRow | Function(record, index) |  | Set custom props per each header row. |\n| showHeader | Boolean | true | whether table head is shown |\n| hidden | Boolean | `false` | Hidden column. |\n| title | Function(currentData) |  | table title render function |\n| footer | Function(currentData) |  | table footer render function |\n| emptyText | React.Node or Function | `No Data` | Display text when data is empty |\n| columns | Object[] |  | The columns config of table, see table below |\n| components | Object |  | Override table elements, see [#171](https://github.com/react-component/table/pull/171) for more details |\n| sticky | boolean \\| {offsetHeader?: number, offsetScroll?: number, getContainer?: () => Window \\| HTMLElement } | false | stick header and scroll bar |\n| summary | (data: readonly RecordType[]) => React.ReactNode | - | `summary` attribute in `table` component is used to define the summary row. |\n| rowHoverable | boolean | true | Table hover interaction |\n\n## Column Props\n\n| Name | Type | Default | Description |\n| --- | --- | --- | --- |\n| key | String |  | key of this column |\n| className | String |  | className of this column |\n| colSpan | Number |  | thead colSpan of this column |\n| title | React Node |  | title of this column |\n| dataIndex | String |  | display field of the data record |\n| width | String \\| Number |  | width of the specific proportion calculation according to the width of the columns |\n| minWidth | Number |  | the minimum width of the column, only worked when tableLayout is auto |\n| fixed | String \\| Boolean |  | this column will be fixed when table scroll horizontally: true or 'left' or 'right' |\n| align | String |  | specify how cell content is aligned |\n| ellipsis | Boolean |  | specify whether cell content be ellipsized |\n| rowScope | 'row' \\| 'rowgroup' |  | Set scope attribute for all cells in this column |\n| onCell | Function(record, index) |  | Set custom props per each cell. |\n| onHeaderCell | Function(record) |  | Set custom props per each header cell. |\n| render | Function(value, row, index) |  | The render function of cell, has three params: the text of this cell, the record of this row, the index of this row, it's return an object:{ children: value, props: { colSpan: 1, rowSpan:1 } } ==> 'children' is the text of this cell, props is some setting of this cell, eg: 'colspan' set td colspan, 'rowspan' set td rowspan |\n\n## Summary Props\n\n### Table.Summary\n\n| Name | Type | Default | Description |\n| --- | --- | --- | --- |\n| key | String |  | key of this summary |\n| fixed | boolean \\| 'top' \\| 'bottom' | - | `true` fixes the summary row at the bottom of the table. `top` fixes the summary row at the top of the table, while `bottom` fixes it at the bottom. `undefined` or `false` makes the summary row scrollable along with the table. |\n\n### Table.Summary.Row\n\n| Name | Type | Default | Description |\n| --- | --- | --- | --- |\n| key | String |  | key of this summary |\n| className | String | - | className of this summary row |\n| style | React.CSSProperties | - | style of this summary row |\n| onClick | (e?: React.MouseEvent\\<HTMLElement>) => void | - | The `onClick` attribute in `Table.Summary.Row` component can be used to set a click event handler for the summary row. |\n\n## License\n\nrc-table is released under the MIT license.\n","publish_time":1756452632207,"_cnpm_publish_time":1756452632207,"dist-tags":{"latest":"7.55.1"}}