20180930 release

This commit is contained in:
AllenFang 2018-09-30 14:11:34 +08:00
parent 6f117c4a0f
commit fbf0795aa4
7 changed files with 83 additions and 2 deletions

View File

@ -35,7 +35,12 @@ Like column, we support to custom the style, class on the selecting row easily v
* For header cell: [`selectRow.selectionRenderer`](row-select-props.html#selectrowselectionrenderer-function)
* For normal cell: [`selectRow.selectionHeaderRenderer`](./row-select-props.html#selectrowselectionheaderrenderer-function)
In addition, `react-bootstrap-table2` offer a [`selectRow.hideSelectColumn`](./row-select-props.html#selectrowhideselectcolumn-bool) to let you hide the selection column.
<br/>
In addition, `react-bootstrap-table2` offer below props to hide selection column:
* [`selectRow.hideSelectColumn`](./row-select-props.html#selectrowhideselectcolumn-bool): Hide the selection column.
* [`selectRow.hideSelectAll`](./row-select-props.html#selectrowhideselectall-bool): Hide the select all checkbox in the selection header cell.
## Event Listening

View File

@ -25,6 +25,7 @@ Currently, `react-bootstrap-table2` only wrapped up the following events to allo
* `onDoubleClick`
* `onMouseEnter`
* `onMouseLeave`
* `onContextMenu`
```js
const rowEvents = {
@ -35,7 +36,7 @@ const rowEvents = {
<BootstrapTable data={ data } columns={ columns } rowEvents={ rowEvents } />
```
Anyway, it's welcome to ask us to add more wrapped on events.
Anyway, it's welcome to ask us to add more wrapped events.
## Row Attributes

View File

@ -23,6 +23,7 @@ const cellEdit = cellEditFactory({
* [blurToSave](#celleditblurtosave-bool)
* [nonEditableRows](#celleditnoneditablerows-function)
* [timeToCloseMessage](#celledittimetoclosemessage-function)
* [autoSelectText](#celleditautoselecttext-bool)
* [beforeSaveCell](#celleditbeforesavecell-function)
* [afterSaveCell](#celleditaftersavecell-function)
* [onStartEdit](#celleditonstartedit-function)
@ -43,6 +44,11 @@ Default is `false`, enable it will be able to save the cell automatically when b
## cellEdit.timeToCloseMessage - [Function]
If a [`column.validator`](./column-props.html#columnvalidator-function) defined and the new value is invalid, `react-bootstrap-table2` will popup a alert at the bottom of editor. `cellEdit.timeToCloseMessage` is a chance to let you decide how long the alert should be stay. Default is 3000 millisecond.
## cellEdit.autoSelectText - [Bool]
Default is false, when enable it, `react-bootstrap-table2` will help you to select the text in the text input automatically when editing.
> NOTE: This props only work for `text` and `textarea`.
## cellEdit.beforeSaveCell - [Function]
This callback function will be called before triggering cell update.

View File

@ -15,6 +15,7 @@ title: Row Expand Props
* [onExpand](#expandrowonexpand-function)
* [onExpandAll](#expandrowonexpandall-function)
* [showExpandColumn](#expandrowshowexpandcolumn-bool)
* [onlyOneExpanding](#expandrowonlyoneexpanding-bool)
* [expandColumnRenderer](#expandrowexpandcolumnrenderer-function)
* [expandHeaderColumnRenderer](#expandrowexpandheadercolumnrenderer-function)
@ -102,6 +103,16 @@ const expandRow = {
};
```
## expandRow.onlyOneExpanding - [Bool]
Default is `false`. Enable this will only allow one row get expand at the same time.
```js
const expandRow = {
renderer: (row) => ...
onlyOneExpanding: true
};
```
## 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

View File

@ -28,6 +28,7 @@ const selectRow = {
* [onSelect](#selectrowonselect-function)
* [onSelectAll](#selectrowonselectall-function)
* [hideSelectColumn](#selectrowhideselectcolumn-bool)
* [hideSelectAll](#selectrowhideselectall-bool)
* [selectionRenderer](#selectrowselectionrenderer-function)
* [selectionHeaderRenderer](#selectrowselectionheaderrenderer-function)
@ -195,6 +196,15 @@ const selectRow = {
};
```
## selectRow.hideSelectAll - [Bool]
Default is `false`, if you don't want to render the select all checkbox ine the header of selection column, give this prop as `true`!
```js
const selectRow = {
mode: 'checkbox',
hideSelectAll: true
};
```
## selectRow.selectionRenderer - [Function]
Provide a callback function which allow you to custom the checkbox/radio box. This callback only have one argument which is an object and contain following properties:

View File

@ -10,6 +10,7 @@ Table search in one of features supported by `react-bootstrap-table2-toolkit`. B
## Optional
* [searchFormatted](#searchsearchformatted-bool)
* [defaultSearch](#searchdefaultSearch-string)
-----
@ -29,3 +30,20 @@ If you want to search on the formatted data, you are supposed to enable this pro
// ...
</ToolkitProvider>
```
## search.defaultSearch - [String]
Accept a string that will be used for default searching when first time table render.
```js
<ToolkitProvider
keyField="id"
data={ products }
columns={ columns }
search={ {
defaultSearch: 'search something here'
} }
>
// ...
</ToolkitProvider>
```

View File

@ -0,0 +1,30 @@
---
title: New Release (2018-09-30)
author: Allen Fang
authorURL: https://twitter.com/allenfang_tw
---
## Changed Packages
This release bump following packages:
* `react-bootstrap-table-next@1.2.0`
* `react-bootstrap-table2-editor@1.1.0`
* `react-bootstrap-table2-toolkit@1.1.0`
## Changelog
### Bug fixes
* Fixed cannot assign to read only property 'textAlign' of object([#575](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/575))
* Fixed wrong results pass to selectRow.onSelectAll when isSelect argument is false([#570](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/570))
### Features
* Implement `expandRow.onlyOneExpanding`([#574](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/574))
* Implement `selectRow.hideSelectAll`([#574](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/573))
* Support Default Search([#571](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/571))
* Implement auto select input text when editing cell([#569](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/569))
### Enhancements
* Fixe a non printable characters in csv output([#572](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/572))
* Add `onContextMenu` on `rowEvents`([#556](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/556))