Completely updated React, fixed #11, (hopefully)
This commit is contained in:
15
goTorrentWebUI/node_modules/react-bootstrap-table/lib/toolbar/InsertModal.js
generated
vendored
15
goTorrentWebUI/node_modules/react-bootstrap-table/lib/toolbar/InsertModal.js
generated
vendored
@@ -67,9 +67,8 @@ var InsertModal = function (_Component) {
|
||||
}, {
|
||||
key: '__handleSave__REACT_HOT_LOADER__',
|
||||
value: function __handleSave__REACT_HOT_LOADER__() {
|
||||
var bodyRefs = this.refs.body;
|
||||
if (bodyRefs.getFieldValue) {
|
||||
this.props.onSave(bodyRefs.getFieldValue());
|
||||
if (this.body.getFieldValue) {
|
||||
this.props.onSave(this.body.getFieldValue());
|
||||
} else {
|
||||
console.error('Custom InsertModalBody should implement getFieldValue function\n and should return an object presented as the new row that user input.');
|
||||
}
|
||||
@@ -77,6 +76,8 @@ var InsertModal = function (_Component) {
|
||||
}, {
|
||||
key: 'render',
|
||||
value: function render() {
|
||||
var _this3 = this;
|
||||
|
||||
var _props = this.props,
|
||||
headerComponent = _props.headerComponent,
|
||||
footerComponent = _props.footerComponent,
|
||||
@@ -96,7 +97,9 @@ var InsertModal = function (_Component) {
|
||||
footerComponent = footerComponent && footerComponent(onModalClose, this.handleSave);
|
||||
|
||||
if (bodyComponent) {
|
||||
bodyComponent = _react2.default.cloneElement(bodyComponent, { ref: 'body' });
|
||||
bodyComponent = _react2.default.cloneElement(bodyComponent, { ref: function ref(node) {
|
||||
return _this3.body = node;
|
||||
} });
|
||||
}
|
||||
|
||||
if (headerComponent && headerComponent.type.name === _InsertModalHeader2.default.name) {
|
||||
@@ -144,7 +147,9 @@ var InsertModal = function (_Component) {
|
||||
version: this.props.version,
|
||||
className: 'react-bs-table-inser-modal-header',
|
||||
onModalClose: onModalClose }),
|
||||
bodyComponent || _react2.default.createElement(_InsertModalBody2.default, _extends({ ref: 'body' }, bodyAttr)),
|
||||
bodyComponent || _react2.default.createElement(_InsertModalBody2.default, _extends({ ref: function ref(node) {
|
||||
return _this3.body = node;
|
||||
} }, bodyAttr)),
|
||||
footerComponent || _react2.default.createElement(_InsertModalFooter2.default, {
|
||||
className: 'react-bs-table-inser-modal-footer',
|
||||
onModalClose: onModalClose,
|
||||
|
Reference in New Issue
Block a user