Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -217,9 +217,7 @@ var ToolBar = function (_Component) {
var delay = this.props.searchDelayTime ? this.props.searchDelayTime : 0;
this.debounceCallback = this.handleDebounce(function () {
var seachInput = _this3.refs.seachInput;
seachInput && _this3.props.onSearch(seachInput.getValue());
_this3.seachInput && _this3.props.onSearch(_this3.seachInput.getValue());
}, delay);
}
}, {
@@ -237,10 +235,8 @@ var ToolBar = function (_Component) {
}, {
key: 'setSearchInput',
value: function setSearchInput(text) {
var seachInput = this.refs.seachInput;
if (seachInput && seachInput.value !== text) {
seachInput.value = text;
if (this.seachInput && this.seachInput.value !== text) {
this.seachInput.value = text;
}
}
}, {
@@ -392,11 +388,6 @@ var ToolBar = function (_Component) {
value: function __handleDropRowBtnClick__REACT_HOT_LOADER__() {
this.props.onDropRow();
}
}, {
key: 'handleCloseBtn',
value: function handleCloseBtn() {
this.refs.warning.style.display = 'none';
}
}, {
key: '__handleKeyUp__REACT_HOT_LOADER__',
value: function __handleKeyUp__REACT_HOT_LOADER__(event) {
@@ -411,9 +402,7 @@ var ToolBar = function (_Component) {
}, {
key: '__handleClearBtnClick__REACT_HOT_LOADER__',
value: function __handleClearBtnClick__REACT_HOT_LOADER__() {
var seachInput = this.refs.seachInput;
seachInput && seachInput.setValue('');
this.seachInput && this.seachInput.setValue('');
this.props.onSearch('');
}
}, {
@@ -532,6 +521,8 @@ var ToolBar = function (_Component) {
}, {
key: 'renderSearchPanel',
value: function renderSearchPanel() {
var _this7 = this;
if (this.props.enableSearch) {
var classNames = 'form-group form-group-sm react-bs-table-search-form';
var clearBtn = null;
@@ -554,16 +545,22 @@ var ToolBar = function (_Component) {
});
if (searchField.type.name === _SearchField2.default.name) {
searchField = _react2.default.cloneElement(searchField, {
ref: 'seachInput',
ref: function ref(node) {
return _this7.seachInput = node;
},
onKeyUp: this.handleKeyUp
});
} else {
searchField = _react2.default.cloneElement(searchField, {
ref: 'seachInput'
ref: function ref(node) {
return _this7.seachInput = node;
}
});
}
} else {
searchField = _react2.default.createElement(_SearchField2.default, { ref: 'seachInput',
searchField = _react2.default.createElement(_SearchField2.default, { ref: function ref(node) {
return _this7.seachInput = node;
},
defaultValue: this.props.defaultSearch,
placeholder: this.props.searchPlaceholder,
onKeyUp: this.handleKeyUp });
@@ -627,6 +624,7 @@ var ToolBar = function (_Component) {
_reactModal2.default,
{ className: 'react-bs-insert-modal modal-dialog',
isOpen: this.state.isInsertModalOpen,
ariaHideApp: false,
onRequestClose: this.handleModalClose,
contentLabel: 'Modal' },
modal