提交 b276ca65 编写于 作者: A afc163

checkAll should be disabled when every checkbox is disabled

上级 01468cdc
......@@ -317,7 +317,14 @@ let AntTable = React.createClass({
className: 'ant-table-selection-column'
};
} else {
let checkboxAll = <Checkbox checked={checked} onChange={this.handleSelectAllRow}/>;
const checkboxAllDisabled = data.every(item =>
this.props.rowSelection.getCheckboxProps &&
this.props.rowSelection.getCheckboxProps(item).disabled);
const checkboxAll = (
<Checkbox checked={checked}
disabled={checkboxAllDisabled}
onChange={this.handleSelectAllRow} />
);
selectionColumn = {
key: 'selection-column',
title: checkboxAll,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册