diff --git a/docs/README.md b/docs/README.md
index 181b4a8..b7c5982 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -17,6 +17,7 @@
* [condensed](#condensed)
* [id](#id)
* [classes](#classes)
+* [wrapperClasses](#wrapperClasses)
* [cellEdit](#cellEdit)
* [selectRow](#selectRow)
* [rowStyle](#rowStyle)
@@ -107,6 +108,9 @@ Same as bootstrap `.table-condensed` class for making a table more compact by cu
Customize id on `table` element.
### classes - [String]
Customize class on `table` element.
+
+### wrapperClasses - [String]
+Customize class on the outer element which wrap up the `table` element.
### cellEdit - [Object]
Makes table cells editable, please see [cellEdit definition](./cell-edit.md) for more detail.
diff --git a/package.json b/package.json
index 56c17c7..5564378 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,8 @@
"test:watch": "jest --watch",
"storybook": "cd ./packages/react-bootstrap-table2-example && yarn storybook",
"gh-pages:clean": "cd ./packages/react-bootstrap-table2-example && yarn gh-pages:clean",
- "gh-pages:build": "cd ./packages/react-bootstrap-table2-example && yarn gh-pages:build"
+ "gh-pages:build": "cd ./packages/react-bootstrap-table2-example && yarn gh-pages:build",
+ "release": "yarn install && yarn build && lerna publish"
},
"repository": {
"type": "git",
diff --git a/packages/react-bootstrap-table2-example/examples/basic/customized-id-classes.js b/packages/react-bootstrap-table2-example/examples/basic/customized-id-classes.js
index d14c606..fae4bf7 100644
--- a/packages/react-bootstrap-table2-example/examples/basic/customized-id-classes.js
+++ b/packages/react-bootstrap-table2-example/examples/basic/customized-id-classes.js
@@ -33,6 +33,7 @@ const columns = [{
{ sourceCode }
);
diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/base-table/_index.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/base-table/_index.scss
index 34353eb..beaf76d 100644
--- a/packages/react-bootstrap-table2-example/stories/stylesheet/base-table/_index.scss
+++ b/packages/react-bootstrap-table2-example/stories/stylesheet/base-table/_index.scss
@@ -5,3 +5,7 @@ table.foo {
table#bar {
background-color: $light-blue;
}
+
+div.boo {
+ border: 2px solid salmon;
+}
\ No newline at end of file
diff --git a/packages/react-bootstrap-table2-filter/src/wrapper.js b/packages/react-bootstrap-table2-filter/src/wrapper.js
index f13e615..33867fd 100644
--- a/packages/react-bootstrap-table2-filter/src/wrapper.js
+++ b/packages/react-bootstrap-table2-filter/src/wrapper.js
@@ -30,13 +30,11 @@ export default (Base, {
// I think this condition only isRemoteFilter is enough
store.filteredData = store.getAllData();
this.setState(() => ({ isDataChanged: true, currFilters: store.filters }));
- } else if (isDataChanged) {
- if (!isRemoteFilter && Object.keys(this.state.currFilters).length > 0) {
+ } else {
+ if (Object.keys(this.state.currFilters).length > 0) {
store.filteredData = filters(store, columns, _)(this.state.currFilters);
}
this.setState(() => ({ isDataChanged }));
- } else {
- this.setState(() => ({ isDataChanged: false }));
}
}
@@ -50,7 +48,8 @@ export default (Base, {
onFilter(column, filterType) {
return (filterVal) => {
const { store, columns } = this.props;
- const currFilters = Object.assign({}, this.state.currFilters);
+ // watch out here if migration to context API, #334
+ const currFilters = Object.assign({}, store.filters);
const { dataField, filter } = column;
if (!_.isDefined(filterVal) || filterVal === '') {
diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js
index 0e801cb..91e46cc 100644
--- a/packages/react-bootstrap-table2/src/bootstrap-table.js
+++ b/packages/react-bootstrap-table2/src/bootstrap-table.js
@@ -52,9 +52,12 @@ class BootstrapTable extends PropsBaseResolver(Component) {
caption,
rowStyle,
rowClasses,
+ wrapperClasses,
rowEvents
} = this.props;
+ const tableWrapperClass = cs('react-bootstrap-table', wrapperClasses);
+
const tableClass = cs('table', {
'table-striped': striped,
'table-hover': hover,
@@ -75,7 +78,7 @@ class BootstrapTable extends PropsBaseResolver(Component) {
const tableCaption = (caption &&