20181221 release

This commit is contained in:
AllenFang 2018-12-21 16:46:07 +08:00
parent 587e456447
commit 4bd080adbd
3 changed files with 40 additions and 4 deletions

View File

@ -126,18 +126,21 @@ const expandRow = {
```
## expandRow.expandColumnRenderer - [Function]
Provide a callback function which allow you to custom the expand indicator. This callback only have one argument which is an object and contain one property `expanded` to indicate if current row is expanded
Provide a callback function which allow you to custom the expand indicator. This callback only have one argument which is an object and contain these properties:
* `expanded`: If current row is expanded or not
* `rowKey`: Current row key
* `expandable`: If currnet row is expandable or not
```js
const expandRow = {
renderer: (row) => ...,
showExpandColumn: true,
expandColumnRenderer: ({ expanded }) => (
renderer: (row) => ...
expandColumnRenderer: ({ expanded, rowKey, expandable }) => (
// ....
)
};
```
```
## expandRow.expandHeaderColumnRenderer - [Function]

View File

@ -28,6 +28,7 @@ title: BootstrapTable Props
* [rowStyle](#rowstyle-object-function)
* [rowClasses](#rowclasses-string-function)
* [rowEvents](#rowevents-object)
* [hiddenRows](#hiddenrows-array)
* [defaultSorted](#defaultsorted-array)
* [defaultSortDirection](#defaultSortDirection-string)
* [pagination](#pagination-object)
@ -183,6 +184,14 @@ const rowEvents = {
<BootstrapTable data={ data } columns={ columns } rowEvents={ rowEvents } />
```
## hiddenRows - [Array]
Hide rows, this props accept an array of row keys:
```js
const hiddenRows = [1, 4];
<BootstrapTable data={ data } columns={ columns } hiddenRows={ hiddenRows } />
```
## defaultSorted - [Array]
`defaultSorted` accept an object array which allow you to define the default sort columns when first render.

View File

@ -0,0 +1,24 @@
---
title: New Release (2018-12-21)
author: Allen Fang
authorURL: https://twitter.com/allenfang_tw
---
## Changed Packages
We got following package version bump in this release:
* `react-bootstrap-table-next@1.4.3`
## Changelog
### Bug fixes
* Fixed a non expandable row still expandable when `expandRow.showExpandColumn` is enable([#698](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/698))
### Features
N/A
### Enhancements
* Support hidden row([4ddbfd4](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/721/commits/4ddbfd4972f84606450b0e1ff87778423ccb49d0))
* Pass `rowKey` and `expandable` to `expandRow.expandColumnRenderer` callback function([bc4697b](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/721/commits/bc4697bf9598377c34abaa8c6ffd16b4174bcf5b))