Skip to content

Commit af4dfd9

Browse files
committed
prod
1 parent 048fbe1 commit af4dfd9

File tree

3 files changed

+50
-30
lines changed

3 files changed

+50
-30
lines changed

dist/react-bootstrap-table.js

+45-25
Original file line numberDiff line numberDiff line change
@@ -3801,19 +3801,21 @@ return /******/ (function(modules) { // webpackBootstrap
38013801
_createClass(TableEditColumn, [{
38023802
key: '__handleKeyPress__REACT_HOT_LOADER__',
38033803
value: function __handleKeyPress__REACT_HOT_LOADER__(e) {
3804-
if (e.keyCode === 13) {
3804+
if (e.keyCode === 13 || e.keyCode === 9) {
38053805
// Pressed ENTER
38063806
var value = e.currentTarget.type === 'checkbox' ? this._getCheckBoxValue(e) : e.currentTarget.value;
38073807

38083808
if (!this.validator(value)) {
38093809
return;
38103810
}
3811-
this.props.completeEdit(value, this.props.rowIndex, this.props.colIndex);
3811+
if (e.keyCode === 13) {
3812+
this.props.completeEdit(value, this.props.rowIndex, this.props.colIndex);
3813+
} else {
3814+
this.props.onTab(this.props.rowIndex + 1, this.props.colIndex + 1, 'tab', e);
3815+
e.preventDefault();
3816+
}
38123817
} else if (e.keyCode === 27) {
38133818
this.props.completeEdit(null, this.props.rowIndex, this.props.colIndex);
3814-
} else if (e.keyCode === 9) {
3815-
this.props.onTab(this.props.rowIndex + 1, this.props.colIndex + 1, 'tab', e);
3816-
e.preventDefault();
38173819
} else if (e.type === 'click' && !this.props.blurToSave) {
38183820
// textarea click save button
38193821
var _value = e.target.parentElement.firstChild.value;
@@ -3830,7 +3832,7 @@ return /******/ (function(modules) { // webpackBootstrap
38303832
if (this.props.blurToSave) {
38313833
var value = e.currentTarget.type === 'checkbox' ? this._getCheckBoxValue(e) : e.currentTarget.value;
38323834
if (!this.validator(value)) {
3833-
return;
3835+
return false;
38343836
}
38353837
this.props.completeEdit(value, this.props.rowIndex, this.props.colIndex);
38363838
}
@@ -16099,7 +16101,9 @@ return /******/ (function(modules) { // webpackBootstrap
1609916101
key: '__handleColumnClick__REACT_HOT_LOADER__',
1610016102
value: function __handleColumnClick__REACT_HOT_LOADER__() {
1610116103
if (this.props.isOnlyHead || !this.props.dataSort) return;
16102-
var order = this.props.sort === _Const2.default.SORT_DESC ? _Const2.default.SORT_ASC : _Const2.default.SORT_DESC;
16104+
var order = this.props.sort;
16105+
16106+
if (!order && this.props.defaultASC) order = _Const2.default.SORT_ASC;else order = this.props.sort === _Const2.default.SORT_DESC ? _Const2.default.SORT_ASC : _Const2.default.SORT_DESC;
1610316107
this.props.onSort(order, this.props.dataField);
1610416108
}
1610516109
}, {
@@ -16365,7 +16369,8 @@ return /******/ (function(modules) { // webpackBootstrap
1636516369
tdAttr: _react.PropTypes.object,
1636616370
tdStyle: _react.PropTypes.object,
1636716371
thStyle: _react.PropTypes.object,
16368-
keyValidator: _react.PropTypes.bool
16372+
keyValidator: _react.PropTypes.bool,
16373+
defaultASC: _react.PropTypes.bool
1636916374
};
1637016375

1637116376
TableHeaderColumn.defaultProps = {
@@ -16400,7 +16405,8 @@ return /******/ (function(modules) { // webpackBootstrap
1640016405
tdAttr: undefined,
1640116406
tdStyle: undefined,
1640216407
thStyle: undefined,
16403-
keyValidator: false
16408+
keyValidator: false,
16409+
defaultASC: false
1640416410
};
1640516411

1640616412
var _default = TableHeaderColumn;
@@ -16983,14 +16989,17 @@ return /******/ (function(modules) { // webpackBootstrap
1698316989
options = _props.options,
1698416990
placeholder = _props.placeholder,
1698516991
columnName = _props.columnName,
16986-
selectText = _props.selectText;
16992+
selectText = _props.selectText,
16993+
withoutEmptyOption = _props.withoutEmptyOption;
1698716994

1698816995
var selectTextValue = selectText !== undefined ? selectText : 'Select';
16989-
optionTags.push(_react2.default.createElement(
16990-
'option',
16991-
{ key: '-1', value: '' },
16992-
placeholder || selectTextValue + ' ' + columnName + '...'
16993-
));
16996+
if (!withoutEmptyOption) {
16997+
optionTags.push(_react2.default.createElement(
16998+
'option',
16999+
{ key: '-1', value: '' },
17000+
placeholder || selectTextValue + ' ' + columnName + '...'
17001+
));
17002+
}
1699417003
Object.keys(options).map(function (key) {
1699517004
optionTags.push(_react2.default.createElement(
1699617005
'option',
@@ -17167,7 +17176,11 @@ return /******/ (function(modules) { // webpackBootstrap
1716717176
key: 'getComparatorOptions',
1716817177
value: function getComparatorOptions() {
1716917178
var optionTags = [];
17170-
optionTags.push(_react2.default.createElement('option', { key: '-1' }));
17179+
var withoutEmptyComparatorOption = this.props.withoutEmptyComparatorOption;
17180+
17181+
if (!withoutEmptyComparatorOption) {
17182+
optionTags.push(_react2.default.createElement('option', { key: '-1' }));
17183+
}
1717117184
for (var i = 0; i < this.numberComparators.length; i++) {
1717217185
optionTags.push(_react2.default.createElement(
1717317186
'option',
@@ -17181,14 +17194,17 @@ return /******/ (function(modules) { // webpackBootstrap
1718117194
key: 'getNumberOptions',
1718217195
value: function getNumberOptions() {
1718317196
var optionTags = [];
17184-
var options = this.props.options;
17185-
17197+
var _props = this.props,
17198+
options = _props.options,
17199+
withoutEmptyNumberOption = _props.withoutEmptyNumberOption;
1718617200

17187-
optionTags.push(_react2.default.createElement(
17188-
'option',
17189-
{ key: '-1', value: '' },
17190-
this.props.placeholder || 'Select ' + this.props.columnName + '...'
17191-
));
17201+
if (!withoutEmptyNumberOption) {
17202+
optionTags.push(_react2.default.createElement(
17203+
'option',
17204+
{ key: '-1', value: '' },
17205+
this.props.placeholder || 'Select ' + this.props.columnName + '...'
17206+
));
17207+
}
1719217208
for (var i = 0; i < options.length; i++) {
1719317209
optionTags.push(_react2.default.createElement(
1719417210
'option',
@@ -17275,11 +17291,15 @@ return /******/ (function(modules) { // webpackBootstrap
1727517291
}
1727617292
},
1727717293
placeholder: _react.PropTypes.string,
17278-
columnName: _react.PropTypes.string
17294+
columnName: _react.PropTypes.string,
17295+
withoutEmptyComparatorOption: _react.PropTypes.bool,
17296+
withoutEmptyNumberOption: _react.PropTypes.bool
1727917297
};
1728017298

1728117299
NumberFilter.defaultProps = {
17282-
delay: _Const2.default.FILTER_DELAY
17300+
delay: _Const2.default.FILTER_DELAY,
17301+
withoutEmptyComparatorOption: false,
17302+
withoutEmptyNumberOption: false
1728317303
};
1728417304

1728517305
var _default = NumberFilter;

dist/react-bootstrap-table.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)