react-bootstrap-table-next
Advanced tools
Comparing version 3.2.1 to 3.3.0
@@ -25,2 +25,6 @@ 'use strict'; | ||
var _filters = require('./filters'); | ||
var _filters2 = _interopRequireDefault(_filters); | ||
var _caption = require('./caption'); | ||
@@ -128,3 +132,4 @@ | ||
expandRow = _props2.expandRow, | ||
cellEdit = _props2.cellEdit; | ||
cellEdit = _props2.cellEdit, | ||
filterPosition = _props2.filterPosition; | ||
@@ -140,2 +145,6 @@ | ||
var hasFilters = columns.some(function (col) { | ||
return col.filter || col.filterRenderer; | ||
}); | ||
var hasFooter = _utils2.default.filter(columns, function (col) { | ||
@@ -168,4 +177,14 @@ return _utils2.default.has(col, 'footer'); | ||
selectRow: selectRow, | ||
expandRow: expandRow | ||
expandRow: expandRow, | ||
filterPosition: filterPosition | ||
}), | ||
hasFilters && filterPosition !== _const2.default.FILTERS_POSITION_INLINE && _react2.default.createElement(_filters2.default, { | ||
columns: columns, | ||
className: this.props.filtersClasses, | ||
onSort: this.props.onSort, | ||
onFilter: this.props.onFilter, | ||
currFilters: this.props.currFilters, | ||
filterPosition: this.props.filterPosition, | ||
onExternalFilter: this.props.onExternalFilter | ||
}), | ||
_react2.default.createElement(_body2.default, { | ||
@@ -209,3 +228,3 @@ data: this.getData(), | ||
})]), | ||
noDataIndication: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]), | ||
noDataIndication: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func]), | ||
striped: _propTypes2.default.bool, | ||
@@ -261,2 +280,4 @@ bordered: _propTypes2.default.bool, | ||
headerClasses: _propTypes2.default.string, | ||
filtersClasses: _propTypes2.default.string, | ||
filterPosition: _propTypes2.default.oneOf([_const2.default.FILTERS_POSITION_TOP, _const2.default.FILTERS_POSITION_INLINE, _const2.default.FILTERS_POSITION_BOTTOM]), | ||
footerClasses: _propTypes2.default.string, | ||
@@ -303,5 +324,6 @@ defaultSorted: _propTypes2.default.arrayOf(_propTypes2.default.shape({ | ||
nonEditableRows: [] | ||
} | ||
}, | ||
filterPosition: _const2.default.FILTERS_POSITION_INLINE | ||
}; | ||
exports.default = BootstrapTable; |
@@ -20,3 +20,6 @@ 'use strict'; | ||
TYPE_BOOLEAN: 'bool', | ||
TYPE_DATE: 'date' | ||
TYPE_DATE: 'date', | ||
FILTERS_POSITION_INLINE: 'inline', | ||
FILTERS_POSITION_TOP: 'top', | ||
FILTERS_POSITION_BOTTOM: 'bottom' | ||
}; |
@@ -73,2 +73,3 @@ 'use strict'; | ||
currFilters = _props.currFilters, | ||
filterPosition = _props.filterPosition, | ||
onExternalFilter = _props.onExternalFilter; | ||
@@ -140,11 +141,13 @@ var text = column.text, | ||
if (filterRenderer) { | ||
var onCustomFilter = onExternalFilter(column, filter.props.type); | ||
filterElm = filterRenderer(onCustomFilter, column); | ||
} else if (filter) { | ||
filterElm = _react2.default.createElement(filter.Filter, _extends({}, filter.props, { | ||
filterState: currFilters[column.dataField], | ||
onFilter: onFilter, | ||
column: column | ||
})); | ||
if (filterPosition === _const2.default.FILTERS_POSITION_INLINE) { | ||
if (filterRenderer) { | ||
var onCustomFilter = onExternalFilter(column, filter.props.type); | ||
filterElm = filterRenderer(onCustomFilter, column); | ||
} else if (filter) { | ||
filterElm = _react2.default.createElement(filter.Filter, _extends({}, filter.props, { | ||
filterState: currFilters[column.dataField], | ||
onFilter: onFilter, | ||
column: column | ||
})); | ||
} | ||
} | ||
@@ -210,2 +213,3 @@ | ||
onFilter: _propTypes2.default.func, | ||
filterPosition: _propTypes2.default.oneOf([_const2.default.FILTERS_POSITION_INLINE, _const2.default.FILTERS_POSITION_BOTTOM, _const2.default.FILTERS_POSITION_TOP]), | ||
currFilters: _propTypes2.default.object, | ||
@@ -212,0 +216,0 @@ onExternalFilter: _propTypes2.default.func |
@@ -50,5 +50,6 @@ 'use strict'; | ||
selectRow = props.selectRow, | ||
expandRow = props.expandRow, | ||
currFilters = props.currFilters, | ||
onExternalFilter = props.onExternalFilter, | ||
expandRow = props.expandRow; | ||
filterPosition = props.filterPosition; | ||
@@ -86,7 +87,8 @@ | ||
sorting: currSort, | ||
sortOrder: sortOrder, | ||
isLastSorting: isLastSorting, | ||
onFilter: onFilter, | ||
currFilters: currFilters, | ||
onExternalFilter: onExternalFilter, | ||
sortOrder: sortOrder, | ||
isLastSorting: isLastSorting | ||
filterPosition: filterPosition | ||
}); | ||
@@ -132,5 +134,6 @@ })]; | ||
className: _propTypes2.default.string, | ||
expandRow: _propTypes2.default.object | ||
expandRow: _propTypes2.default.object, | ||
filterPosition: _propTypes2.default.oneOf([_const2.default.FILTERS_POSITION_TOP, _const2.default.FILTERS_POSITION_INLINE, _const2.default.FILTERS_POSITION_BOTTOM]) | ||
}; | ||
exports.default = Header; |
{ | ||
"name": "react-bootstrap-table-next", | ||
"version": "3.2.1", | ||
"version": "3.3.0", | ||
"description": "Next generation of react-bootstrap-table", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1127822
55
13076