Hide selection component in children data

This commit is contained in:
afc163 2016-02-22 18:51:45 +08:00
parent 7668473f17
commit 08e04e0b14
4 changed files with 12 additions and 2 deletions

View File

@ -78,7 +78,7 @@ const data = [{
}];
ReactDOM.render(
<Table columns={columns} dataSource={data} indentSize={30} />,
<Table columns={columns} dataSource={data} indentSize={20} />,
mountNode
);
````

View File

@ -584,6 +584,7 @@ let AntTable = React.createClass({
data={data}
columns={columns}
className={classString}
expandIconColumnIndex={columns[0].key === 'selection-column' ? 1 : 0}
expandIconAsCell={expandIconAsCell} />
{emptyText}
</div>

View File

@ -58,7 +58,7 @@
"rc-slider": "~3.3.0",
"rc-steps": "~1.4.1",
"rc-switch": "~1.3.2",
"rc-table": "~3.9.0",
"rc-table": "~3.10.1",
"rc-tabs": "~5.7.0",
"rc-time-picker": "~1.1.0",
"rc-tooltip": "~3.3.1",

View File

@ -318,6 +318,15 @@
content: '.';
}
}
// Hide selection component in children data
&[class*="@{table-prefix-cls}-row-level-"] .@{table-prefix-cls}-selection-column > span {
display: none;
}
&[class*="@{table-prefix-cls}-row-level-0"] .@{table-prefix-cls}-selection-column > span {
display: inline-block;
}
}
tr&-expanded-row {
&,