From fbf0795aa47a9917784029077425f57e6fb89912 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sun, 30 Sep 2018 14:11:34 +0800 Subject: [PATCH] 20180930 release --- docs/basic-row-select.md | 7 +++++- docs/basic-row.md | 3 ++- docs/cell-edit-props.md | 6 +++++ docs/row-expand-props.md | 11 +++++++++ docs/row-select-props.md | 10 +++++++++ docs/search-props.md | 18 +++++++++++++++ website/blog/2018-09-30-version-bump.md | 30 +++++++++++++++++++++++++ 7 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 website/blog/2018-09-30-version-bump.md diff --git a/docs/basic-row-select.md b/docs/basic-row-select.md index 86d1713..30af695 100644 --- a/docs/basic-row-select.md +++ b/docs/basic-row-select.md @@ -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. +
+ +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 diff --git a/docs/basic-row.md b/docs/basic-row.md index a9f2474..9ea470e 100644 --- a/docs/basic-row.md +++ b/docs/basic-row.md @@ -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 = { ``` -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 diff --git a/docs/cell-edit-props.md b/docs/cell-edit-props.md index c57d35f..cae2ca8 100644 --- a/docs/cell-edit-props.md +++ b/docs/cell-edit-props.md @@ -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. diff --git a/docs/row-expand-props.md b/docs/row-expand-props.md index a62202f..4753c7d 100644 --- a/docs/row-expand-props.md +++ b/docs/row-expand-props.md @@ -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 diff --git a/docs/row-select-props.md b/docs/row-select-props.md index 7908bbc..bdd30a5 100644 --- a/docs/row-select-props.md +++ b/docs/row-select-props.md @@ -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: diff --git a/docs/search-props.md b/docs/search-props.md index aa8cd40..e52d9d9 100644 --- a/docs/search-props.md +++ b/docs/search-props.md @@ -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 // ... ``` + +## search.defaultSearch - [String] +Accept a string that will be used for default searching when first time table render. + + ```js + + // ... + +``` + diff --git a/website/blog/2018-09-30-version-bump.md b/website/blog/2018-09-30-version-bump.md new file mode 100644 index 0000000..1d05694 --- /dev/null +++ b/website/blog/2018-09-30-version-bump.md @@ -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))