react-responsive-tabs
Advanced tools
Comparing version 0.4.8 to 0.4.9
@@ -123,4 +123,4 @@ 'use strict'; | ||
var tabsWidth = {}; | ||
Object.keys(this.refs).forEach(function (key) { | ||
var width = _this2.refs[key].offsetWidth; | ||
Object.keys(this.tabRefs).forEach(function (key) { | ||
var width = _this2.tabRefs[key].offsetWidth; | ||
tabsWidth[key.replace(tabPrefix, '')] = width; | ||
@@ -203,2 +203,4 @@ tabsTotalWidth += width; | ||
value: function _getTabProps(_ref) { | ||
var _this3 = this; | ||
var title = _ref.title; | ||
@@ -217,3 +219,5 @@ var key = _ref.key; | ||
id: tabPrefix + key, | ||
ref: tabPrefix + key, | ||
ref: function ref(e) { | ||
_this3.tabRefs[tabPrefix + key] = e; | ||
}, | ||
originalKey: key, | ||
@@ -294,6 +298,6 @@ onClick: this._onChangeTab, | ||
value: function _onFocusTab(focusedTabKey) { | ||
var _this3 = this; | ||
var _this4 = this; | ||
return function () { | ||
return _this3.setState({ focusedTabKey: focusedTabKey }); | ||
return _this4.setState({ focusedTabKey: focusedTabKey }); | ||
}; | ||
@@ -316,3 +320,3 @@ } | ||
value: function render() { | ||
var _this4 = this; | ||
var _this5 = this; | ||
@@ -333,3 +337,3 @@ var _getTabs2 = this._getTabs(); | ||
ref: function ref(e) { | ||
_this4.tabsWrapper = e; | ||
_this5.tabsWrapper = e; | ||
}, | ||
@@ -340,5 +344,5 @@ onKeyDown: this._onKeyDown | ||
if (tabsVisible[panel.key]) { | ||
result.push(_react2.default.createElement(_Tab2.default, _this4._getTabProps(tabsVisible[panel.key]))); | ||
result.push(_react2.default.createElement(_Tab2.default, _this5._getTabProps(tabsVisible[panel.key]))); | ||
} | ||
result.push(_react2.default.createElement(_TabPanel2.default, _this4._getPanelProps(panel))); | ||
result.push(_react2.default.createElement(_TabPanel2.default, _this5._getPanelProps(panel))); | ||
return result; | ||
@@ -349,6 +353,6 @@ }, []), | ||
{ ref: function ref(e) { | ||
_this4.tabsShowMore = e; | ||
_this5.tabsShowMore = e; | ||
}, isShown: this.props.showMore }, | ||
tabsHidden.map(function (tab) { | ||
return _react2.default.createElement(_Tab2.default, _this4._getTabProps(tab)); | ||
return _react2.default.createElement(_Tab2.default, _this5._getTabProps(tab)); | ||
}) | ||
@@ -355,0 +359,0 @@ ), |
{ | ||
"author": "Vitalii Maslianok <maslianok@gmail.com> (https://github.com/maslianok)", | ||
"version": "0.4.8", | ||
"version": "0.4.9", | ||
"bugs": { | ||
@@ -5,0 +5,0 @@ "url": "https://github.com/maslianok/react-responsive-tabs/issues" |
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
36345
754