Comparing version 3.7.0 to 3.7.1
# History | ||
---- | ||
## 3.7.1 / 2015-12-28 | ||
- fix align of indent nested children table | ||
- fix expandRowRender called problems when it is not expanded | ||
## 3.7.0 / 2015-12-28 | ||
- indent nested children table | ||
## 3.6.0 / 2015-11-11 | ||
@@ -5,0 +14,0 @@ |
@@ -172,2 +172,5 @@ 'use strict'; | ||
var expandedRowClassName = props.expandedRowClassName; | ||
var needIndentSpaced = props.data.some(function (record) { | ||
return record[childrenColumnName] && record[childrenColumnName].length > 0; | ||
}); | ||
for (var i = 0; i < data.length; i++) { | ||
@@ -179,3 +182,3 @@ var record = data[i]; | ||
var expandedRowContent = undefined; | ||
if (expandedRowRender) { | ||
if (expandedRowRender && isRowExpanded) { | ||
expandedRowContent = expandedRowRender(record, i); | ||
@@ -187,2 +190,3 @@ } | ||
indentSize: props.indentSize, | ||
needIndentSpaced: needIndentSpaced, | ||
className: className, | ||
@@ -195,3 +199,3 @@ record: record, | ||
onExpand: this.onExpanded, | ||
expandable: childrenColumn || expandedRowContent, | ||
expandable: childrenColumn || expandedRowRender, | ||
expanded: isRowExpanded, | ||
@@ -198,0 +202,0 @@ prefixCls: props.prefixCls + '-row', |
@@ -38,2 +38,3 @@ 'use strict'; | ||
var indentSize = props.indentSize; | ||
var needIndentSpaced = props.needIndentSpaced; | ||
@@ -57,2 +58,5 @@ for (var i = 0; i < columns.length; i++) { | ||
onClick: props.onExpand.bind(null, !expanded, record) }); | ||
} else if (i === 0 && needIndentSpaced) { | ||
expandIcon = _react2['default'].createElement('span', { | ||
className: prefixCls + '-expand-icon ' + prefixCls + '-spaced' }); | ||
} | ||
@@ -59,0 +63,0 @@ |
{ | ||
"name": "rc-table", | ||
"version": "3.7.0", | ||
"version": "3.7.1", | ||
"description": "table ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
22958
436
0