Skip to content

Commit

Permalink
fix conflicts and bump to
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Apr 23, 2017
2 parents 3168cf8 + aacb293 commit 7737406
Show file tree
Hide file tree
Showing 26 changed files with 769 additions and 196 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: node_js
node_js:
- "0.12"
- "6"

26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
<a name="v3.2.1"></a>
# [v3.2.1](https://github.com/AllenFang/react-bootstrap-table/compare/v3.2.0...v3.2.1) (2017-04-20)
## Bug fixes
* Fixed search and pagination not working together([5a533cf](https://github.com/AllenFang/react-bootstrap-table/commit/5a533cfb6512c1200d66a962323b00d5316f2e12))
* It's a very critical bug since from `v3.1.8`

<a name="v3.2.0"></a>
# [v3.2.0](https://github.com/AllenFang/react-bootstrap-table/compare/v3.1.8...v3.2.0) (2017-04-16)
## Enhancement
* Now, we are able to custom the field in insert modal([8b66a74](https://github.com/AllenFang/react-bootstrap-table/commit/8b66a74178ebffdb8bad43bcbbf1381887ac7835))
* Check [example](https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/custom/insert-modal/custom-insert-modal-field.js)

## Features
* Support conjunction search([246a7fa](https://github.com/AllenFang/react-bootstrap-table/commit/246a7fa721e0dd3846d1c1dcb48db2c114d261cb))
* Please check [#1199](https://github.com/AllenFang/react-bootstrap-table/issues/1199)
* Allow to expand only one row at a time([c4c1b7f](https://github.com/AllenFang/react-bootstrap-table/commit/c4c1b7f377bbe3956b867d0afadf98e0e8c46cb6))
* configure via `options.onlyOneExpanding` and assign `true`

<a name="v3.1.8"></a>
# [v3.1.8](https://github.com/AllenFang/react-bootstrap-table/compare/v3.1.7...v3.1.8) (2017-04-13)
## Bug fixes
* Fix wrong page jumping after search, filter etc.([b686d1a](https://github.com/AllenFang/react-bootstrap-table/commit/b686d1a44b95878cbd0bdc91a7a8b20ce7fb8671))

## Enhancement
* Add class name `react-bs-table-sizePerPage-dropdown` for sizePerPage dropdown([da82469](https://github.com/AllenFang/react-bootstrap-table/commit/da82469431fdec4efb466b8d08a106b1448d7b44))

<a name="v3.1.7"></a>
# [v3.1.7](https://github.com/AllenFang/react-bootstrap-table/compare/v3.1.6...v3.1.7) (2017-04-07)
## Bug fixes
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ Check [this](http://allenfang.github.io/react-bootstrap-table/advance.html) for
Check the <a href='https://github.com/AllenFang/react-bootstrap-table/blob/master/CHANGELOG.md'>CHANGELOG</a> for more detail release notes.

## Notes
***`v4.0.0-beta.1` published, this release is for replacing `react-toastr` with `react-s-alert`, check [PR#1216](https://github.com/AllenFang/react-bootstrap-table/pull/1216) and after `v4.0.0`, `react-bootstrap-table` will use `react-s-alert` for notification***

***```v3.0.0``` released, check [examples](https://github.com/AllenFang/react-bootstrap-table/tree/v3.0.0-dev/examples/js/custom) to learn how to customize the component. following
is the major things we completed in this release***
- Remove the `bootstrap.js` and `jQuery` dependencies
- More easy and have ability to customize the components(search, pagination, insert modal etc.)
- Key board Navigation

***```v2.10.0-beta.1``` is a revised version for fixing couples unalign column and incorrect height etc. If you have any unalign problems before `v2.9.2`, give this beta version a try and any feedback is welcome***

***```v3.0.0``` is under planning, check [Milestone to v3.0.0](https://github.com/AllenFang/react-bootstrap-table/issues/497).<br/>***

***After ```v2.4.4```, we move the css files to ```dist``` folder for allowing this repo can be hosted on [cdnjs](https://github.com/cdnjs/cdnjs)<br/>***

## Development
Expand Down Expand Up @@ -91,7 +89,7 @@ In the `dist` folder you have a UMD bundle with source maps (`react-bootstrap-ta
<script>
var ReactBsTable = window.BootstrapTable;
//...
<script/>
</script>
```
The UMD build is also available on [npmcdn](https://npmcdn.com):
Expand Down
2 changes: 1 addition & 1 deletion __tests__/BootstrapTable-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jest.dontMock('../src/TableRow.js');
jest.dontMock('../src/pagination/PaginationList.js');
jest.dontMock('../src/pagination/PageButton.js');

describe('BootstrapTable', function() {
xdescribe('BootstrapTable', function() {
var testData = [
{id: 1, name: "name1", price: 100},
{id: 2, name: "name2", price: 120},
Expand Down
2 changes: 1 addition & 1 deletion __tests__/TableHeaderColumn-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jest.dontMock('../src/TableRow.js');
jest.dontMock('../src/pagination/PaginationList.js');
jest.dontMock('../src/pagination/PageButton.js');

describe('TableHeaderColumn Test', function() {
xdescribe('TableHeaderColumn Test', function() {

var React;
var TestUtils;
Expand Down
137 changes: 137 additions & 0 deletions __tests__/store/TableDataStore-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
var TableDataStore = require('../../src/store/TableDataStore.js').TableDataStore;

describe('TableDataStore', function() {

var store;

describe('search() modes (strictSearch and multiColumnSearch flags)', function() {

var colInfos = {
col1: { searchable: true },
col2: { searchable: true },
col3: { searchable: true },
desc: { searchable: false }
};
var searchText = ' B C ';
var data = [
{ col1: 'A B C D', col2: 'E', col3: 'F', desc: 'part of the content in col1' },
{ col1: 'A', col2: ' B C ', col3: 'D E F', desc: 'whole content in col2' },
{ col1: 'F E D', col2: ' C B ', col3: 'A', desc: 'whole content in wrong order in col2' },
{ col1: 'A', col2: 'B C ', col3: 'D E F', desc: 'without leading whitespace in col2' },
{ col1: 'A', col2: ' B C', col3: 'D E F', desc: 'without trailing whitespace in col2' },
{ col1: 'A B', col2: 'C D', col3: 'E F', desc: 'one part in col1, other part in col2' },
{ col1: 'A B', col2: 'X D', col3: 'E F', desc: 'one part in col1, other part absent' },
{ col1: 'A X', col2: 'X D', col3: 'E F', desc: 'completely absent' }
];

beforeEach(function(){
store = new TableDataStore(data);
});

[
{ colInfos: colInfos },
{ colInfos: colInfos, multiColumnSearch: false },
{ colInfos: colInfos, strictSearch: true },
{ colInfos: colInfos, multiColumnSearch: false, strictSearch: true }
].forEach(function(props) {
it('default strict single column mode - multiColumnSearch: ' + props.multiColumnSearch
+ ', strictSearch: ' + props.strictSearch, function() {
store.setProps(props);

store.search(searchText);
expect(store.filteredData).toEqual(data.slice(0, 2));
});
});

[
{ colInfos: colInfos, strictSearch: false },
{ colInfos: colInfos, multiColumnSearch: false, strictSearch: false }
].forEach(function(props) {
it('non-strict single column mode - multiColumnSearch: ' + props.multiColumnSearch
+ ', strictSearch: ' + props.strictSearch, function() {
store.setProps(props);

store.search(searchText);
expect(store.filteredData).toEqual(data.slice(0, 5));
});
});

[
{ colInfos: colInfos, multiColumnSearch: true, strictSearch: true }
].forEach(function(props) {
it('strict multi column mode - multiColumnSearch: ' + props.multiColumnSearch
+ ', strictSearch: ' + props.strictSearch, function() {
store.setProps(props);

store.search(searchText);
expect(store.filteredData).toEqual(data.slice(0, 6));
});
});

[
{ colInfos: colInfos, multiColumnSearch: true },
{ colInfos: colInfos, multiColumnSearch: true, strictSearch: false }
].forEach(function(props) {
it('non-strict multi column mode - multiColumnSearch: ' + props.multiColumnSearch
+ ', strictSearch: ' + props.strictSearch, function() {
store.setProps(props);

store.search(searchText);
expect(store.filteredData).toEqual(data.slice(0, 7));
});
});
});

describe('search() respecting formated or filter values', function() {

var undefinedVar;
var data = [
{ col: undefinedVar},
{ col: null },
{ col: 0 },
{ col: 'A' }
];

beforeEach(function(){
store = new TableDataStore(data);
});

[
{
searchable: true,
filterValue: function() { return 'X'; }
},
{
searchable: true,
filterFormatted: true,
format: function() { return 'X'; }
},
{
searchable: true,
filterValue: function() { return '-'; },
filterFormatted: true,
format: function() { return 'X'; }
},
{
searchable: true,
filterValue: function() { return 'X'; },
filterFormatted: false,
format: function() { return '-'; }
},
{
searchable: true,
filterValue: function() { return 'X'; },
format: function() { return '-'; }
}
].forEach(function(def) {
it('include non-values with filterValue: ' + def.filterValue + ', format: ' + def.format
+ ', filterFormatted: ' + def.filterFormatted, function() {
store.setProps({ colInfos: { col: def } });

store.search('X');
expect(store.filteredData.length).toBe(4);
expect(store.filteredData).toEqual(data);
});
});
});
});
Loading

0 comments on commit 7737406

Please sign in to comment.