20191207 release

This commit is contained in:
AllenFang 2019-12-07 17:19:52 +08:00
parent b9e2d743ff
commit 8d10f17229
5 changed files with 56 additions and 3 deletions

View File

@ -52,8 +52,10 @@ Defined [`onSort`](./column-props.html#columnonsort-function) on target column:
```
### Manage Sorting Externally
You can configure `sort` props and give `dataField` and `order` on `BootstrapTable` component to set the sorting state:
Please refer [this](./table-props.html#sort-object) docs.
**Coming Soon!**
Usually you will need it when you want to control the sorting state externally, like clicking on a button outside the table to force to sort a specified column.
## Custom the Sorting Algorithm

View File

@ -12,6 +12,7 @@ Export CSV in one of features supported by `react-bootstrap-table2-toolkit`. By
* [fileName](#exportCSVfilename-string)
* [separator](#exportCSVseparator-string)
* [ignoreHeader](#exportCSVignoreheader-bool)
* [ignoreFooter](#exportCSVignorefooter-bool)
* [noAutoBOM](#exportCSVnoautobom-bool)
* [blobType](#exportCSVblobtype-string)
* [exportAll](#exportCSVexportall-bool)
@ -47,6 +48,9 @@ Custom the csv file separator.
## exportCSV.ignoreHeader - [bool]
Default is `false`. Give true to avoid to attach the csv header.
## exportCSV.ignoreFooter - [bool]
Default is `true`. Give `false` to attach the table footer if enabled.
## exportCSV.noAutoBOM - [bool]
Default is `true`.

View File

@ -70,8 +70,8 @@ Please see [Work with table sort](./basic-sort.html).
- [v] Remote mode
- [v] Custom the sorting header
- [v] Sort event listener
- [ ] Custom the sort caret
- [ ] Sort management
- [v] Custom the sort caret
- [v] Sort management
- [ ] Multi sort
Due to no `TableHeaderColumn` so that no `dataSort` here, please add [`sort`](./column-props.html#columnsort-bool) property on column definition.

View File

@ -29,6 +29,7 @@ title: BootstrapTable Props
* [rowClasses](#rowclasses-string-function)
* [rowEvents](#rowevents-object)
* [hiddenRows](#hiddenrows-array)
* [sort](#sort-object)
* [defaultSorted](#defaultsorted-array)
* [defaultSortDirection](#defaultSortDirection-string)
* [pagination](#pagination-object)
@ -194,6 +195,27 @@ const hiddenRows = [1, 4];
<BootstrapTable data={ data } columns={ columns } hiddenRows={ hiddenRows } />
```
## sort - [Object]
Two cases you probably need to configure `sort` prop:
### Manage sorting state
You can give `dataField` and `order` to specify the sorting state in table, For example
```js
<BootstrapTable sort={ { dataField: 'price', order: 'asc' } }>
```
### One-time sorting configuration
In earily version, we only can configure [`sortCaret`](./column-props.html#columnsortcaret-function) and [`sortFunc` ](./column-props.html#columnsortfunc-function) per column. But they are same in most of cases.
So here we give you a chance to just setup these props in one time.
```js
<BootstrapTable sort={ {
sortCaret: ...
sortFunc: ...
} }>
```
## defaultSorted - [Array]
`defaultSorted` accept an object array which allow you to define the default sort columns when first render.

View File

@ -0,0 +1,25 @@
---
title: New Release (2019-12-07)
author: Allen Fang
authorURL: https://twitter.com/allenfang_tw
---
## Changed Packages
We got following packages version bump in this release:
* `react-bootstrap-table-next@3.3.3`
* `react-bootstrap-table2-toolkit@2.1.1`
## Changelog
### Bug fixes
* Fixed wrong table caption in bootstrap 4([38b0fb3](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/1195/commits/ee829eb924538250d266761b7c7750238b0fb340))
### Features
* Allow to export table footer to csv file([47d6eb0](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/1195/commits/47d6eb097aee9d73a948be1ed4a2dc6123d5ec04))
* Allow to manage sorting state([2068f51](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/1195/commits/2068f518f6f1c6158c2124bb2399edf64da355a3))
### Enhancements
* One-time sorting configuration([a07b2da](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/1195/commits/a07b2da00a0e4703557c6ee5c7a74ff7df732a64))