0306 release

This commit is contained in:
AllenFang 2018-03-05 23:28:07 +08:00
parent 9a2dc319ce
commit cdcd69a854
4 changed files with 43 additions and 2 deletions

View File

@ -17,6 +17,9 @@ We support the single and multiple selection on table, config the [`selectRow.mo
By default behavior, user need to click on the selection column or the checkbox/radio to select/unselect a row, for a user experience perspective, we have [`selectoRow.clickToSelect`](./row-select-props.html#selectrowclicktoselect-bool) to allow user to select/unselect row by clicking on the row.
## Selection Management
Please check [`selectoRow.selected`](./row-select-props.html#selectrowselected-array), it's used for default selection usually but also can be used as a external selection control.
## Customization
### Style/Class

View File

@ -19,7 +19,11 @@ sidebar_label: Work on Row
* [rowEvents](./table-props.html#rowevents-object)
Currently, `react-bootstrap-table2` only wrapped up the `onClick` event to allow its callback to receive `row` and `rowIndex`, for example:
Currently, `react-bootstrap-table2` only wrapped up the following events to allow its callback to receive `row` and `rowIndex`, for example:
* `onClick`
* `onMouseEnter`
* `onMouseLeave`
```js
const rowEvents = {
@ -30,7 +34,7 @@ const rowEvents = {
<BootstrapTable data={ data } columns={ columns } rowEvents={ rowEvents } />
```
Anyway, it's welcome to ask us to add more wrappeds for event callback functions.
Anyway, it's welcome to ask us to add more wrapped on events.
## Row Attributes

View File

@ -18,6 +18,7 @@ const selectRow = {
* [mode (**required**)](#selectrowmode-string)
## Optional
* [selected](#selectrowselected-array)
* [style](#selectrowstyle-object-function)
* [classes](#selectrowclasses-string-function)
* [bgColor](#selectrowbgcolor-string-function)
@ -53,6 +54,16 @@ const selectRow = {
/>
```
## selectRow.selected - [Array]
`selectRow.selected` allow you have default selections on table.
```js
const selectRow = {
mode: 'checkbox',
selected: [1, 3] // should be a row keys array
};
```
## selectRow.style - [Object | Function]
`selectRow.style` allow you to have custom style on selected rows:

View File

@ -0,0 +1,23 @@
---
title: New Release (2018-03-06)
author: Allen Fang
authorURL: https://twitter.com/allenfang_tw
---
## Changed Packages
This release bump following packages:
* `react-bootstrap-table-next@0.1.4`
## Changelog
### Bug fixes
* Fix the sort will not be triggered when data is changed([#232](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/232))
* Fix empty <Caption /> element issue([#219](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/219))
* Fix Failed prop type: The prop `defaultValue` is marked as required in `TextEditor`, but its value is `null`([5dd1f1e9](https://github.com/react-bootstrap-table/react-bootstrap-table2/commit/5dd1f1e9ea90cdf5775b5d08a504c0e2e141a686))
### Features
### Enhancements
* `rowEvents.onMouseEnter` and `rowEvents.onMouseLeave` will be wrapped up and pass row informations([#233](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/233))