Skip to content

Commit 4624364

Browse files
committed
fix conflicts
2 parents 092ed64 + 2fcb24f commit 4624364

33 files changed

+588
-97
lines changed

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
1+
<a name="v3.3.7"></a>
2+
# [v3.3.7](https://github.com/AllenFang/react-bootstrap-table/compare/v3.3.6...v3.3.7) (2017-05-22)
3+
## Enhancement
4+
* Allow conditionally specify columns([9b748df](https://github.com/AllenFang/react-bootstrap-table/commit/9b748df5eb11dad1fe9c5c28044007dbae119b02))
5+
* [#1319](https://github.com/AllenFang/react-bootstrap-table/issues/1319)([338424f](https://github.com/AllenFang/react-bootstrap-table/commit/338424f367b0d233f37c0514daffa4ca043f6f74))
6+
* Allow date filter to filter string value, `react-bootstrap-table` will convert string to Date([63a022a](https://github.com/AllenFang/react-bootstrap-table/commit/63a022a91c7bd90e1f99013d23e3601f1d5de30e))
7+
8+
<a name="v3.3.6"></a>
9+
# [v3.3.6](https://github.com/AllenFang/react-bootstrap-table/compare/v3.3.5...v3.3.6) (2017-05-19)
10+
## Bug fixes
11+
* Fixed ExpandComponent.js:47 Uncaught TypeError: Cannot read property 'className' of undefined([5618342](https://github.com/AllenFang/react-bootstrap-table/commit/5618342f9f46c2ee577fe03e44c38bd0bd1e9666))
12+
13+
<a name="v3.3.5"></a>
14+
# [v3.3.5](https://github.com/AllenFang/react-bootstrap-table/compare/v3.3.4...v3.3.5) (2017-05-17)
15+
## Bug fixes
16+
* Fix `editable.type` will be ignore if is not `textarea`, `select`, `checkbox`, and `datetime`([e3f87e0](https://github.com/AllenFang/react-bootstrap-table/commit/e3f87e0160ae73e95fa54f4586ab99cfe2cfb720))
17+
18+
## Enhancement
19+
* Able to set the default value for field in insert model easily([5bd62b4](https://github.com/AllenFang/react-bootstrap-table/commit/5bd62b4acec324f20188104d792285a0d9147204))
20+
* Use `editable.defaultValue`
21+
* Support `options.onExpand` and accept a function which will be called when expand/collapse happen([f54ebc3](https://github.com/AllenFang/react-bootstrap-table/commit/f54ebc38e1f8d93ecb161934e364e72ce7b35c50))
22+
* Check [example](https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/expandRow/manage-expanding.js#L62).
23+
* Allow `selectRow.className` to accept a function for a easy customization reason([440d376](https://github.com/AllenFang/react-bootstrap-table/commit/440d376158a091dee7b6c6b312ed0827ee897c09))
24+
* Check [example](https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/selection/select-row-class-table.js#L47)
25+
* Able to apply custom style on filter([1e8f1f9](https://github.com/AllenFang/react-bootstrap-table/commit/1e8f1f9fbe6d744bd36256e8d5b01dc6c189dc5a))
26+
* Check [example](https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/column-filter/filter-style.js#L75)
27+
28+
<a name="v3.3.4"></a>
29+
# [v3.3.4](https://github.com/AllenFang/react-bootstrap-table/compare/v3.3.3...v3.3.4) (2017-05-13)
30+
## Bug fiexs
31+
* Fix `afterSearch` and `afterColumnFilter` doesn't be called when table rerender([24e5b66](https://github.com/AllenFang/react-bootstrap-table/commit/24e5b666c39286faf0b42a64498177f30e6e7b90))
32+
33+
## Enhancement
34+
* Able to clean sorted table([261c6ea](https://github.com/AllenFang/react-bootstrap-table/commit/261c6ea04c5cc0c06eb3d6182ea17a9ce08c0e6b))
35+
* Please check [this](https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/sort/clean-sorted-table.js#L24-L26) example
36+
37+
* Able to configure the text and value of select option in cell editing or insert modal([face547](https://github.com/AllenFang/react-bootstrap-table/commit/face5476351e77db416f1cb27178988367151167))
38+
* Please check [this](https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/advance/edit-type-table.js#L7-L24) example
39+
* It's only for the case of `editable.type` is `select`
40+
* Releated issues: [#1031](https://github.com/AllenFang/react-bootstrap-table/issues/1301) and [#243](https://github.com/AllenFang/react-bootstrap-table/pull/243)
41+
142
<a name="v3.3.3"></a>
243
# [v3.3.3](https://github.com/AllenFang/react-bootstrap-table/compare/v3.3.2...v3.3.3) (2017-05-08)
344
## Bug fixes

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
**I'm busy on my work so maybe will have a long delay to see your guys PR or issues, sorry. I'll back as soon as possible**
1+
**Currently, I'm busy on my job, so maybe have some delay on you guys's issue.**
2+
3+
* Please make sure your issue wasn't open before
4+
* Please provide your example code and keep it simple and minimal if necessary
5+
* Please give a clean steps to show everyone how to reproduce your issus

dist/react-bootstrap-table.js

Lines changed: 153 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-bootstrap-table.js.map

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-bootstrap-table.min.js

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/js/advance/demo.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint max-len: 0 */
22
import React from 'react';
33
import EditTypeTable from './edit-type-table';
4+
import InsertDefaultValueTable from './insert-default-value-table';
45
import DataInsertTypeTable from './insert-type-table';
56
import AutoRowKeyTable from './auto-rowkey-table';
67
import ValidatorTable from './validator-table';
@@ -24,7 +25,11 @@ class Demo extends React.Component {
2425
{ renderLinks('advance/insert-type-table.js') }
2526
<DataInsertTypeTable/>
2627
</Panel>
27-
<Panel header={ 'Hide column on Insert Modal)' }>
28+
<Panel header={ 'Default Value on Insert Modal' }>
29+
{ renderLinks('advance/insert-default-value-table.js') }
30+
<InsertDefaultValueTable/>
31+
</Panel>
32+
<Panel header={ 'Hide column on Insert Modal' }>
2833
{ renderLinks('advance/hide-on-insert-table.js') }
2934
<h5>This example hide the Job Name field in insert modal</h5>
3035
<HideOnInsertTable/>

examples/js/advance/edit-type-table.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ const jobTypes = [ {
2222
value: 'D',
2323
text: 'TYPE_D'
2424
} ];
25+
// For above example, you can also use textKey and valueKey to change the hard code key for 'text' and 'value'
26+
// for example, editable={ { type: 'select', options: { values: jobTypes, textKey: 'customTextKey , valueKey: 'customValueKey'} } }
2527

2628
function addJobs(quantity) {
2729
const startId = jobs.length;
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/* eslint max-len: 0 */
2+
import React from 'react';
3+
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
4+
5+
6+
const jobs = [];
7+
const jobTypes = [ {
8+
value: 'A',
9+
text: 'TYPE_A'
10+
}, {
11+
value: 'B',
12+
text: 'TYPE_B'
13+
}, {
14+
value: 'C',
15+
text: 'TYPE_C'
16+
}, {
17+
value: 'D',
18+
text: 'TYPE_D'
19+
} ];
20+
21+
function addJobs(quantity) {
22+
const startId = jobs.length;
23+
for (let i = 0; i < quantity; i++) {
24+
const id = startId + i;
25+
jobs.push({
26+
id: id,
27+
name: 'Item name ' + id,
28+
type: 'B',
29+
active: i % 2 === 0 ? 'Y' : 'N',
30+
datetime: '200' + i + '-12-28T14:57:00'
31+
});
32+
}
33+
}
34+
35+
addJobs(5);
36+
37+
const cellEditProp = {
38+
mode: 'click',
39+
blurToSave: true
40+
};
41+
42+
export default class InsertDefaultValueTable extends React.Component {
43+
constructor(props) {
44+
super(props);
45+
this.formatType = this.formatType.bind(this);
46+
}
47+
48+
formatType(cell) {
49+
return `TYPE_${cell}`;
50+
}
51+
52+
render() {
53+
return (
54+
<BootstrapTable data={ jobs } cellEdit={ cellEditProp } insertRow>
55+
<TableHeaderColumn dataField='id' isKey={ true }>Job ID</TableHeaderColumn>
56+
<TableHeaderColumn dataField='name' editable={ { type: 'textarea', defaultValue: 'Default Job Name' } }>Job Name</TableHeaderColumn>
57+
<TableHeaderColumn dataField='type' dataFormat={ this.formatType } editable={ { type: 'select', options: { values: jobTypes }, defaultValue: 'C' } }>Job Type</TableHeaderColumn>
58+
<TableHeaderColumn dataField='active' editable={ { type: 'checkbox', options: { values: 'Y:N' }, defaultValue: 'N' } }>Active</TableHeaderColumn>
59+
<TableHeaderColumn dataField='datetime' editable={ { type: 'datetime' } }>Date Time</TableHeaderColumn>
60+
</BootstrapTable>
61+
);
62+
}
63+
}

examples/js/column-filter/all-filters.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ function enumFormatter(cell, row, enumObject) {
3636
}
3737

3838
function dateFormatter(cell, row) {
39+
if (typeof cell !== 'object') {
40+
cell = new Date(cell);
41+
}
42+
3943
return `${('0' + cell.getDate()).slice(-2)}/${('0' + (cell.getMonth() + 1)).slice(-2)}/${cell.getFullYear()}`;
4044
}
4145

examples/js/column-filter/date-filter-programmatically.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ function addProducts(quantity) {
2323
addProducts(5);
2424

2525
function dateFormatter(cell, row) {
26+
if (typeof cell !== 'object') {
27+
cell = new Date(cell);
28+
}
29+
2630
return `${('0' + cell.getDate()).slice(-2)}/${('0' + (cell.getMonth() + 1)).slice(-2)}/${cell.getFullYear()}`;
2731
}
2832

0 commit comments

Comments
 (0)