diff --git a/docs/cell-edit-props.md b/docs/cell-edit-props.md index 07664b7..c57d35f 100644 --- a/docs/cell-edit-props.md +++ b/docs/cell-edit-props.md @@ -25,6 +25,7 @@ const cellEdit = cellEditFactory({ * [timeToCloseMessage](#celledittimetoclosemessage-function) * [beforeSaveCell](#celleditbeforesavecell-function) * [afterSaveCell](#celleditaftersavecell-function) +* [onStartEdit](#celleditonstartedit-function) * [errorMessage](#cellediterrormessage-string) * [onErrorMessageDisappear](#celleditonerrormessagedisappear-function) @@ -62,6 +63,16 @@ const cellEdit = { }; ``` +## cellEdit.onStartEdit - [Function] +This callback function will be called after editor component mounted + +```js +const cellEdit = { + // omit... + onStartEdit: (row, column, rowIndex, columnIndex) => { ... } +}; +``` + ## cellEdit.errorMessage - [String] This prop is not often used. Only used when you want to keep the error message in your application state and also handle the cell editing on [`remote`](./table-props.html#remote-bool-object) mode. diff --git a/docs/column-props.md b/docs/column-props.md index 29efe1d..d006cc2 100644 --- a/docs/column-props.md +++ b/docs/column-props.md @@ -10,6 +10,7 @@ Definition of columns props on BootstrapTable * [text (**required**)](#columntext-required-string) ## Optional +* [isDummyField](#columnisdummyfield-bool) * [hidden](#columnhidden-bool) * [formatter](#columnformatter-function) * [formatExtraData](#columnformatextradata-any) @@ -70,6 +71,12 @@ dataField: 'address.city' ## column.text (**required**) - [String] `text` will be the column text in header column by default, if your header is not only text or you want to customize the header column, please check [`column.headerFormatter`](#columnheaderformatter-function) +## column.isDummyField - [Bool] +Sometime, you just want to have a column which is not perform any data but just some action components. In this situation, we suggest you to use `isDummyField`. If column is dummy, the [`column.dataField`](#dataField) can be any string value, cause of it's meaningless. However, please keep `dataField` as unique as possible. + +There's only one different for dummy column than normal column, which is dummy column will compare the whole row value instead of cell value when call `shouldComponentUpdate`. + + ## column.hidden - [Bool] `hidden` allow you to hide column when `true` given. diff --git a/docs/export-csv-props.md b/docs/export-csv-props.md index f7b5f36..1d43e21 100644 --- a/docs/export-csv-props.md +++ b/docs/export-csv-props.md @@ -14,6 +14,7 @@ Export CSV in one of features supported by `react-bootstrap-table2-toolkit`. By * [ignoreHeader](#exportCSVignoreheader-bool) * [noAutoBOM](#exportCSVnoautobom-bool) * [exportAll](#exportCSVexportall-bool) +* [onlyExportSelection](#exportCSVonlyexportselection-bool) ## Example @@ -48,4 +49,7 @@ Default is `false`. Give true to avoid to attach the csv header. Default is `true`. ## exportCSV.exportAll - [bool] -Default is `true`. `false` will only export current display data on table. \ No newline at end of file +Default is `true`. `false` will only export current display data on table. + +## exportCSV.onlyExportSelection - [bool] +Default is `false`. `true` will only export the data which is selected \ No newline at end of file diff --git a/website/blog/2018-09-03-version-bump.md b/website/blog/2018-09-03-version-bump.md new file mode 100644 index 0000000..884fc4b --- /dev/null +++ b/website/blog/2018-09-03-version-bump.md @@ -0,0 +1,27 @@ +--- +title: New Release (2018-09-03) +author: Allen Fang +authorURL: https://twitter.com/allenfang_tw +--- + +## Changed Packages + +This release bump following packages: + +* `react-bootstrap-table-next@1.1.4` +* `react-bootstrap-table2-editor@1.0.1` +* `react-bootstrap-table2-toolkit@1.0.3` + + +## Changelog + +### Bug fixes +* Fixed `selectRow.onSelectAll` will return `undefined` value after search([#509](https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/509)) + +### Features +* Support dummy column([#520](https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/520)) + * Enable it via `column.isDummyField` +* Able to export csv by current selected rows([#522](https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/522)) + +### Enhancements +* Add `onStartEdit` callback which will be called when cell editor is trigger([#523](https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/523))