diff --git a/CHANGELOG.md b/CHANGELOG.md index f261f74..21e458e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [5.18.0](https://github.com/rsuite/rsuite-table/compare/5.17.0...5.18.0) (2023-11-24) + +### Features + +* **Table:** add support function type for children prop ([#474](https://github.com/rsuite/rsuite-table/pull/474)) + # [5.17.0](https://github.com/rsuite/rsuite-table/compare/5.16.0...5.17.0) (2023-11-17) diff --git a/README.md b/README.md index 0b9250b..d300dba 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,17 @@ A React table component. ## Install ```sh -npm i rsuite-table --save +# use npm +npm i rsuite-table + +# or use yarn +yarn add rsuite-table + +# or use pnpm +pnpm add rsuite-table ``` -### Usage +## Usage ```tsx import { Table, Column, HeaderCell, Cell } from 'rsuite-table'; @@ -233,13 +240,6 @@ const NameCell = ({ rowData, ...props }) => ( | scrollPosition | {top:number,left:number} | The scroll position of the table | | scrollTop | (top:number)=>void | Set the number of pixels for vertical scrolling of the table | -[npm-badge]: https://img.shields.io/npm/v/rsuite-table.svg?style=flat-square -[npm]: https://www.npmjs.com/package/rsuite-table -[coverage-badge]: https://img.shields.io/coveralls/rsuite/rsuite-table.svg?style=flat-square -[coverage]: https://coveralls.io/github/rsuite/rsuite-table -[actions-svg]: https://github.com/rsuite/rsuite-table/workflows/Node.js%20CI/badge.svg?branch=main -[actions-home]: https://github.com/rsuite/rsuite-table/actions?query=branch%3Amain+workflow%3A%22Node.js+CI%22 - ### Type safety We can pass generic type parameters to Table, Cell etc. for better type-safety when using typescript. @@ -248,7 +248,7 @@ Passing a render prop to Table is recommended when using TS, as this will ensure the right generic type parameter is automatically propagated to the Cell component. ```ts -const products: Product[] = [{ name: "Pineapple" }]; +const products: Product[] = [{ name: 'Pineapple' }];