mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
20190106 release
This commit is contained in:
parent
53bba2daa4
commit
00e8656f25
@ -44,12 +44,15 @@ This is an example for [manage on expands](../storybook/index.html?selectedKind=
|
||||
### Expand Column
|
||||
`react-bootstrap-table2` default doesn't render a additional indicator column, just like row selection. But if you want it, you can enable it via [`expandRow.showExpandColumn`](./row-expand-props.html#expandrowshowexpandcolumn-bool)
|
||||
|
||||
In addition, we allow you to custom the expand columns:
|
||||
In addition, we allow you to custom the expand columns in following ways:
|
||||
|
||||
* For header cell: [`expandRow.expandHeaderColumnRenderer`](row-expand-props.html#expandrowexpandheadercolumnrenderer-function)
|
||||
* For normal cell: [`expandRow.expandColumnRenderer`](./row-expand-props.html#expandrowexpandcolumnrenderer-function)
|
||||
|
||||
|
||||
You can render expand column at the right side of table via [`expandRow.expandColumnPosition`](./row-expand-props.html#expandrowexpandcolumnposition-string).
|
||||
|
||||
|
||||
## Event Listening
|
||||
|
||||
* [`expandRow.onExpand`](./row-expand-props.html#expandrowonexpand-function) allow you to listen a row is expand or collapse.
|
||||
|
||||
@ -84,9 +84,13 @@ const columns = [{
|
||||
|
||||
### textFilter.delay - [Number]
|
||||
* Debounce time, which means how long will trigger filtering after user typing. Default is `500ms`.
|
||||
|
||||
### textFilter.getFilter - [Function]
|
||||
* export `filter` function to allow users to access. For textFilter, `filter(value)` to filter columns dynamically.
|
||||
|
||||
### textFilter.onFilter - [Function]
|
||||
* Register a listener which will be called when column filter being triggered.
|
||||
|
||||
**Example**
|
||||
```js
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
@ -109,6 +113,9 @@ const columns = [{
|
||||
onClick: e => console.log(e),
|
||||
getFilter: (filter) => { // nameFilter was assigned once the component has been mounted.
|
||||
nameFilter = filter;
|
||||
},
|
||||
onFilter: (filterValue) => { filter listener
|
||||
//...
|
||||
}
|
||||
})
|
||||
}, {
|
||||
@ -145,6 +152,9 @@ const columns = [{
|
||||
### selectFilter.getFilter - [Function]
|
||||
* export `filter` function to allow users to access. For selectFilter, `filter(value)` to filter columns dynamically.
|
||||
|
||||
### selectFilter.onFilter - [Function]
|
||||
* Register a listener which will be called when column filter being triggered.
|
||||
|
||||
**Example**
|
||||
```js
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
@ -170,6 +180,9 @@ const columns = [
|
||||
style: { backgroundColor: 'pink' },
|
||||
getFilter: (filter) => { // qualityFilter was assigned once the component has been mounted.
|
||||
qualityFilter = filter;
|
||||
},
|
||||
onFilter: (filterValue) => { filter listener
|
||||
//...
|
||||
}
|
||||
})
|
||||
}];
|
||||
@ -203,6 +216,9 @@ const columns = [
|
||||
### multiSelectFilter.getFilter - [Function]
|
||||
* export `filter` function to allow users to access. For multiSelectFilter, `filter(value)` to filter columns dynamically.
|
||||
|
||||
### multiSelectFilter.onFilter - [Function]
|
||||
* Register a listener which will be called when column filter being triggered.
|
||||
|
||||
**Example**
|
||||
```js
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
@ -228,6 +244,9 @@ const columns = [
|
||||
style: { backgroundColor: 'pink' },
|
||||
getFilter: (filter) => { // qualityFilter was assigned once the component has been mounted.
|
||||
qualityFilter = filter;
|
||||
},
|
||||
onFilter: (filterValue) => { filter listener
|
||||
//...
|
||||
}
|
||||
})
|
||||
}];
|
||||
@ -284,6 +303,9 @@ const columns = [
|
||||
### numberFilter.getFilter - [Function]
|
||||
* export `filter` function to allow users to access. For numberFilter,<br>`filter({ number, comparator })` to filter columns dynamically.
|
||||
|
||||
### numberFilter.onFilter - [Function]
|
||||
* Register a listener which will be called when column filter being triggered.
|
||||
|
||||
**Example**:
|
||||
```js
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
@ -308,6 +330,9 @@ const columns = [{ ... }, { ... }, {
|
||||
defaultValue: { number: 2103, comparator: Comparator.GT }, // default value
|
||||
getFilter: (filter) => { // priceFilter was assigned once the component has been mounted.
|
||||
priceFilter = filter;
|
||||
},
|
||||
onFilter: (filterValue) => { filter listener
|
||||
//...
|
||||
}
|
||||
})
|
||||
}];
|
||||
@ -358,14 +383,17 @@ const columns = [{ ... }, { ... }, {
|
||||
### dateFilter.getFilter - [Function]
|
||||
* export `filter` function to allow users to access. For dateFilter,<br>`filter({ date, comparator })` to filter columns dynamically.
|
||||
|
||||
### dateFilter.onFilter - [Function]
|
||||
* Register a listener which will be called when column filter being triggered.
|
||||
|
||||
**Example**:
|
||||
```js
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import filterFactory, { dateFilter, Comparator } from 'react-bootstrap-table2-filter';
|
||||
|
||||
const columns = [{ ... }, { ... }, {
|
||||
dataField: 'price',
|
||||
text: 'Product Price',
|
||||
dataField: 'date',
|
||||
text: 'Product Date',
|
||||
filter: dateFilter({
|
||||
delay: 600, // how long will trigger filtering after user typing, default is 500 ms
|
||||
placeholder: 'custom placeholder', // placeholder for date input
|
||||
@ -377,7 +405,13 @@ const columns = [{ ... }, { ... }, {
|
||||
comparatorClassName: 'custom-comparator-class', // custom the class on comparator select
|
||||
dateStyle: { backgroundColor: 'cadetblue', margin: '0px' }, // custom the style on date input
|
||||
dateClassName: 'custom-date-class', // custom the class on date input
|
||||
defaultValue: { date: new Date(2018, 0, 1), comparator: Comparator.GT } // default value
|
||||
defaultValue: { date: new Date(2018, 0, 1), comparator: Comparator.GT }, // default value
|
||||
getFilter: (filter) => { // prodDateFilter was assigned once the component has been mounted.
|
||||
prodDateFilter = filter;
|
||||
},
|
||||
onFilter: (filterValue) => { filter listener
|
||||
//...
|
||||
}
|
||||
});
|
||||
}];
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ title: Row Expand Props
|
||||
* [showExpandColumn](#expandrowshowexpandcolumn-bool)
|
||||
* [onlyOneExpanding](#expandrowonlyoneexpanding-bool)
|
||||
* [expandByColumnOnly](#expandrowexpandbycolumnonly-bool)
|
||||
* [expandColumnPosition](#expandrowexpandcolumnposition-string)
|
||||
* [expandColumnRenderer](#expandrowexpandcolumnrenderer-function)
|
||||
* [expandHeaderColumnRenderer](#expandrowexpandheadercolumnrenderer-function)
|
||||
|
||||
@ -114,6 +115,16 @@ const expandRow = {
|
||||
};
|
||||
```
|
||||
|
||||
## expandRow.expandColumnPosition - [String]
|
||||
Default is `left`. You can give this as `right` for rendering expand column in the right side.
|
||||
|
||||
```js
|
||||
const expandRow = {
|
||||
renderer: (row) => ...,
|
||||
showExpandColumn: true,
|
||||
expandColumnPosition: 'right'
|
||||
};
|
||||
|
||||
## expandRow.expandByColumnOnly - [Bool]
|
||||
Default is `false`. If you want to restrict user to expand/collapse row via clicking the expand column only, you can enable it.
|
||||
|
||||
|
||||
29
website/blog/2019-01-06-version-bump.md
Normal file
29
website/blog/2019-01-06-version-bump.md
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
title: New Release (2019-01-06)
|
||||
author: Allen Fang
|
||||
authorURL: https://twitter.com/allenfang_tw
|
||||
---
|
||||
|
||||
## Changed Packages
|
||||
|
||||
We got following package version bump in this release:
|
||||
|
||||
* `react-bootstrap-table-next@2.0.1`
|
||||
* `react-bootstrap-table2-filter@1.1.1`
|
||||
* `react-bootstrap-table2-paginator@2.0.1`
|
||||
* `react-bootstrap-table2-toolkit@1.1.2`
|
||||
|
||||
## Changelog
|
||||
|
||||
### Bug fixes
|
||||
* Fixed export csv error (TypeError: this.visibleRows is not a function)([#745](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/745))
|
||||
* Fixed typeError happened on export CSV after js file compression([#745](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/745))
|
||||
* Fixed column header hides but not columnBody or columnData([#741](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/741))
|
||||
* Fixed props type mismatch for SizePerPageOption component([#742](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/742))
|
||||
|
||||
### Features
|
||||
N/A
|
||||
|
||||
### Enhancements
|
||||
* Support render expand column at the right side([#746](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/746))
|
||||
* Support `column.onFilter` hook function([#743](https://github.com/react-bootstrap-table/react-bootstrap-table2/pull/743))
|
||||
Loading…
Reference in New Issue
Block a user