Browse Source

Hide selection component in children data

pull/1058/head
afc163 9 years ago
parent
commit
08e04e0b14
  1. 2
      components/table/demo/expand-children.md
  2. 1
      components/table/index.jsx
  3. 2
      package.json
  4. 9
      style/components/table.less

2
components/table/demo/indent-size.md → components/table/demo/expand-children.md

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

1
components/table/index.jsx

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

2
package.json

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

9
style/components/table.less

@ -318,6 +318,15 @@
content: '.'; 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 { tr&-expanded-row {
&, &,

Loading…
Cancel
Save