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
+7 -4
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]
+9
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.