From cdcd69a8540e0c35603e8b39e99651363efb6ca4 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Mon, 5 Mar 2018 23:28:07 +0800 Subject: [PATCH] 0306 release --- docs/basic-row-select.md | 3 +++ docs/basic-row.md | 8 ++++++-- docs/row-select-props.md | 11 +++++++++++ website/blog/2018-03-06-version-bump.md | 23 +++++++++++++++++++++++ 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 website/blog/2018-03-06-version-bump.md diff --git a/docs/basic-row-select.md b/docs/basic-row-select.md index 37e8e6b..34bf19e 100644 --- a/docs/basic-row-select.md +++ b/docs/basic-row-select.md @@ -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 diff --git a/docs/basic-row.md b/docs/basic-row.md index 5a9d276..c6ac88e 100644 --- a/docs/basic-row.md +++ b/docs/basic-row.md @@ -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 = { ``` -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 diff --git a/docs/row-select-props.md b/docs/row-select-props.md index 5aecaed..860a44e 100644 --- a/docs/row-select-props.md +++ b/docs/row-select-props.md @@ -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: diff --git a/website/blog/2018-03-06-version-bump.md b/website/blog/2018-03-06-version-bump.md new file mode 100644 index 0000000..2419253 --- /dev/null +++ b/website/blog/2018-03-06-version-bump.md @@ -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 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)) \ No newline at end of file