From 8d10f17229fb30efb797c4b79724f1fe679b42b0 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sat, 7 Dec 2019 17:19:52 +0800 Subject: [PATCH] 20191207 release --- docs/basic-sort.md | 4 +++- docs/export-csv-props.md | 4 ++++ docs/migration.md | 4 ++-- docs/table-props.md | 22 ++++++++++++++++++++++ website/blog/2019-12-07-version-bump.md | 25 +++++++++++++++++++++++++ 5 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 website/blog/2019-12-07-version-bump.md diff --git a/docs/basic-sort.md b/docs/basic-sort.md index a4e5591..6f39f27 100644 --- a/docs/basic-sort.md +++ b/docs/basic-sort.md @@ -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 diff --git a/docs/export-csv-props.md b/docs/export-csv-props.md index 2d19fc0..1b48203 100644 --- a/docs/export-csv-props.md +++ b/docs/export-csv-props.md @@ -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`. diff --git a/docs/migration.md b/docs/migration.md index fdcfc90..2a9966c 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -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. diff --git a/docs/table-props.md b/docs/table-props.md index 0f51d4f..b9cf312 100644 --- a/docs/table-props.md +++ b/docs/table-props.md @@ -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]; ``` +## 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 + +``` + +### 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 + +``` + ## defaultSorted - [Array] `defaultSorted` accept an object array which allow you to define the default sort columns when first render. diff --git a/website/blog/2019-12-07-version-bump.md b/website/blog/2019-12-07-version-bump.md new file mode 100644 index 0000000..d0abb78 --- /dev/null +++ b/website/blog/2019-12-07-version-bump.md @@ -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)) \ No newline at end of file