提交 277a00bd authored 作者: chscls@163.com's avatar chscls@163.com

增加表格选择事件

上级 f5f29b85
......@@ -40,7 +40,8 @@ export default class TableList extends React.Component {
}
render() {
return <FormList
return <FormList
onSelectRow={this.props.value.onSelectRow}
istableCom={true}
showHeader={this.props.showHeader}
get={this.props.get}
......
......@@ -626,6 +626,9 @@ class FormList extends React.Component {
};
handleSelectRows = rows => {
if(this.props.onSelectRow){
this.props.onSelectRow(rows)
}
this.setState({
selectedRows: rows,
});
......@@ -1063,7 +1066,7 @@ class FormList extends React.Component {
(!istableCom)||(this.props.value&&this.props.value.columns)?
<StandardTable
showHeader={this.props.showHeader!=null?this.props.showHeader:true}
noSelectRow={rights==null|| !rights.includes('delete') }
noSelectRow={this.props.onSelectRow==null&&( rights==null|| !rights.includes('delete')) }
rowKey="id"
data={data}
isHiddenPage={this.props.isHiddenPage!=null?this.props.isHiddenPage:false}
......@@ -1093,7 +1096,7 @@ class FormList extends React.Component {
{
showDiv&&<StandardTable
showHeader={this.props.showHeader!=null?this.props.showHeader:true}
noSelectRow={rights==null|| !rights.includes('delete') }
noSelectRow={this.props.onSelectRow==null&&( rights==null|| !rights.includes('delete')) }
rowKey="id"
data={data}
columns={this.columns}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论