Changed Packages
+This release bump following packages:
+
+react-bootstrap-table-next@0.1.3
+react-bootstrap-table-filter@0.1.3
+
+Changelog
+Bug fixes
+
+- Fixed TextFilter contains an input of type text with both value and defaultValue props(a0af964)
+
+Features
+
+- Support Number Filter(#200)
+- Support
caseSensitive on Text and Select filter(#201)
+- Support sort event listener(#202)
+
+Enhancements
+
+- Text Filter right now is case insensitive which same as
react-bootstrap-table#201
+rowEvents.onClick will be wrapped so that funcation can recieve additional informatnion like: row and rowIndex(#187)
+
+Changed Packages
This release bump following packages:
react-bootstrap-table-next@0.1.2
diff --git a/docs/basic-filter.html b/docs/basic-filter.html
index 6c21b22..e929ee6 100644
--- a/docs/basic-filter.html
+++ b/docs/basic-filter.html
@@ -22,6 +22,7 @@
- TextFilter
- SelectFilter
+- NumberFilter
- Coming soon!
Text Filter
@@ -47,6 +48,7 @@
className: 'my-custom-text-filter',
defaultValue: 'test',
comparator: Comparator.EQ,
+ caseSensitive: true,
style: { ... },
delay: 1000
});
@@ -86,10 +88,44 @@
className: 'my-custom-text-filter',
defaultValue: '2',
comparator: Comparator.LIKE,
+ caseSensitive: false,
style: { ... },
withoutEmptyOption: true
});
+
+
+Number Filter
+
import filterFactory, { numberFilter } from 'react-bootstrap-table2-filter';
+
+const columns = [..., {
+ dataField: 'price',
+ text: 'Product Price',
+ filter: numberFilter()
+}];
+
+<BootstrapTable keyField='id' data={ products } columns={ columns } filter={ filterFactory() } />
+
+Numner filter is same as other filter, you can custom the number filter via numberFilter factory function:
+import filterFactory, { selectFilter, Comparator } from 'react-bootstrap-table2-filter';
+
+
+const numberFilter = numberFilter({
+ options: [2100, 2103, 2105],
+ delay: 600,
+ placeholder: 'custom placeholder',
+ withoutEmptyComparatorOption: true,
+ withoutEmptyNumberOption: true,
+ comparators: [Comparator.EQ, Comparator.GT, Comparator.LT],
+ style: { display: 'inline-grid' },
+ className: 'custom-numberfilter-class',
+ comparatorStyle: { backgroundColor: 'antiquewhite' },
+ comparatorClassName: 'custom-comparator-class',
+ numberStyle: { backgroundColor: 'cadetblue', margin: '0px' },
+ numberClassName: 'custom-number-class',
+ defaultValue: { number: 2103, comparator: Comparator.GT }
+})
+
\ No newline at end of file
diff --git a/docs/basic-row.html b/docs/basic-row.html
index afcacd9..200c2d7 100644
--- a/docs/basic-row.html
+++ b/docs/basic-row.html
@@ -16,6 +16,15 @@
+
Currently, react-bootstrap-table2 only wrapped up the onClick event to allow its callback to receive row and rowIndex, for example:
+
const rowEvents = {
+ onClick: (e, row, rowIndex) => {
+ ....
+ }
+};
+<BootstrapTable data={ data } columns={ columns } rowEvents={ rowEvents } />
+
+
Anyway, it's welcome to ask us to add more wrappeds for event callback functions.
Row Attributes
Coming Soon!