Skip to content

Commit 281db99

Browse files
committed
v4.1.1
1 parent 5a70141 commit 281db99

File tree

4 files changed

+52
-32
lines changed

4 files changed

+52
-32
lines changed

dist/react-bootstrap-table.js

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ return /******/ (function(modules) { // webpackBootstrap
734734
if (this.store.filterObj) this.handleFilterData(this.store.filterObj);
735735
newState.currPage = _util2.default.getFirstPage(nextProps.options.pageStartIndex);
736736
} else {
737+
data = this.store.sort().get();
737738
newState.data = data;
738739
}
739740
this.setState(function () {
@@ -8207,14 +8208,16 @@ return /******/ (function(modules) { // webpackBootstrap
82078208
}, {
82088209
key: '__handleCellEdit__REACT_HOT_LOADER__',
82098210
value: function __handleCellEdit__REACT_HOT_LOADER__(e) {
8210-
if (this.props.cellEdit.mode === _Const2.default.CELL_EDIT_DBCLICK) {
8211-
if (document.selection && document.selection.empty) {
8212-
document.selection.empty();
8213-
} else if (window.getSelection) {
8214-
var sel = window.getSelection();
8215-
sel.removeAllRanges();
8211+
try {
8212+
if (this.props.cellEdit.mode === _Const2.default.CELL_EDIT_DBCLICK) {
8213+
if (document.selection && document.selection.empty) {
8214+
document.selection.empty();
8215+
} else if (window.getSelection) {
8216+
var sel = window.getSelection();
8217+
sel.removeAllRanges();
8218+
}
82168219
}
8217-
}
8220+
} catch (err) {} /* eslint no-empty: 0 */
82188221
this.props.onEdit(this.props.rIndex + 1, e.currentTarget.cellIndex, e);
82198222
if (this.props.cellEdit.mode !== _Const2.default.CELL_EDIT_DBCLICK) {
82208223
this.props.onClick(this.props.rIndex + 1, e.currentTarget.cellIndex, e);
@@ -9149,13 +9152,22 @@ return /******/ (function(modules) { // webpackBootstrap
91499152
return _this.__toggleDropDown__REACT_HOT_LOADER__.apply(_this, arguments);
91509153
};
91519154

9155+
_this.closeDropDown = function () {
9156+
return _this.__closeDropDown__REACT_HOT_LOADER__.apply(_this, arguments);
9157+
};
9158+
91529159
_this.state = {
91539160
open: _this.props.open
91549161
};
91559162
return _this;
91569163
}
91579164

91589165
_createClass(PaginationList, [{
9166+
key: '__closeDropDown__REACT_HOT_LOADER__',
9167+
value: function __closeDropDown__REACT_HOT_LOADER__() {
9168+
return this.__closeDropDown__REACT_HOT_LOADER__.apply(this, arguments);
9169+
}
9170+
}, {
91599171
key: '__toggleDropDown__REACT_HOT_LOADER__',
91609172
value: function __toggleDropDown__REACT_HOT_LOADER__() {
91619173
return this.__toggleDropDown__REACT_HOT_LOADER__.apply(this, arguments);
@@ -9176,9 +9188,7 @@ return /******/ (function(modules) { // webpackBootstrap
91769188
var keepSizePerPageState = this.props.keepSizePerPageState;
91779189

91789190
if (!keepSizePerPageState) {
9179-
this.setState(function () {
9180-
return { open: false };
9181-
});
9191+
this.closeDropDown();
91829192
}
91839193
}
91849194
}, {
@@ -9208,9 +9218,7 @@ return /******/ (function(modules) { // webpackBootstrap
92089218
}
92099219

92109220
if (keepSizePerPageState) {
9211-
this.setState(function () {
9212-
return { open: false };
9213-
});
9221+
this.closeDropDown();
92149222
}
92159223

92169224
if (page !== currPage) {
@@ -9233,9 +9241,7 @@ return /******/ (function(modules) { // webpackBootstrap
92339241
}
92349242
}
92359243

9236-
this.setState(function () {
9237-
return { open: false };
9238-
});
9244+
this.closeDropDown();
92399245
}
92409246
}, {
92419247
key: '__toggleDropDown__REACT_HOT_LOADER__',
@@ -9248,6 +9254,15 @@ return /******/ (function(modules) { // webpackBootstrap
92489254
};
92499255
});
92509256
}
9257+
}, {
9258+
key: '__closeDropDown__REACT_HOT_LOADER__',
9259+
value: function __closeDropDown__REACT_HOT_LOADER__() {
9260+
this.setState(function () {
9261+
return {
9262+
open: false
9263+
};
9264+
});
9265+
}
92519266
}, {
92529267
key: 'render',
92539268
value: function render() {
@@ -9340,7 +9355,8 @@ return /******/ (function(modules) { // webpackBootstrap
93409355
currSizePerPage: String(sizePerPage),
93419356
sizePerPageList: sizePerPageList,
93429357
toggleDropDown: this.toggleDropDown,
9343-
changeSizePerPage: this.changeSizePerPage
9358+
changeSizePerPage: this.changeSizePerPage,
9359+
onBlur: this.closeDropDown
93449360
});
93459361
if (dropdown.type.name === _SizePerPageDropDown2.default.name) {
93469362
dropdownProps = dropdown.props;
@@ -9362,7 +9378,7 @@ return /******/ (function(modules) { // webpackBootstrap
93629378
{ role: 'menuitem',
93639379
tabIndex: '-1', href: '#',
93649380
'data-page': pageNum,
9365-
onClick: function onClick(e) {
9381+
onMouseDown: function onMouseDown(e) {
93669382
e.preventDefault();
93679383
_this3.changeSizePerPage(pageNum);
93689384
} },
@@ -9375,7 +9391,8 @@ return /******/ (function(modules) { // webpackBootstrap
93759391
hidden: hideSizePerPage,
93769392
currSizePerPage: String(sizePerPageText),
93779393
options: sizePerPageOptions,
9378-
onClick: this.toggleDropDown
9394+
onClick: this.toggleDropDown,
9395+
onBlur: this.closeDropDown
93799396
}, dropdownProps));
93809397
}
93819398
return dropdown;
@@ -9681,6 +9698,7 @@ return /******/ (function(modules) { // webpackBootstrap
96819698
open = _props.open,
96829699
hidden = _props.hidden,
96839700
onClick = _props.onClick,
9701+
onBlur = _props.onBlur,
96849702
options = _props.options,
96859703
className = _props.className,
96869704
variation = _props.variation,
@@ -9700,7 +9718,8 @@ return /******/ (function(modules) { // webpackBootstrap
97009718
{ className: 'btn ' + btnContextual + ' dropdown-toggle',
97019719
id: 'pageDropDown', 'data-toggle': 'dropdown',
97029720
'aria-expanded': open,
9703-
onClick: onClick },
9721+
onClick: onClick,
9722+
onBlur: onBlur },
97049723
currSizePerPage,
97059724
_react2.default.createElement(
97069725
'span',
@@ -9729,7 +9748,8 @@ return /******/ (function(modules) { // webpackBootstrap
97299748
options: _propTypes2.default.array,
97309749
variation: _propTypes2.default.oneOf(['dropdown', 'dropup']),
97319750
className: _propTypes2.default.string,
9732-
onClick: _propTypes2.default.func
9751+
onClick: _propTypes2.default.func,
9752+
onBlur: _propTypes2.default.func
97339753
};
97349754
SizePerPageDropDown.defaultProps = {
97359755
open: false,

dist/react-bootstrap-table.js.map

Lines changed: 1 addition & 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: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-bootstrap-table",
3-
"version": "4.1.0",
3+
"version": "4.1.1",
44
"description": "It's a react table for bootstrap",
55
"main": "./lib/index.js",
66
"repository": {

0 commit comments

Comments
 (0)