Skip to content

Commit

Permalink
Merge pull request umijs#115 from linziguan/master
Browse files Browse the repository at this point in the history
fix: solve rowSelection affected by alert prop.
  • Loading branch information
sendya authored Mar 7, 2019
2 parents 9a83387 + 556cc7b commit 68ddd4f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default {
},
rowSelection: {
type: Object,
default: () => ({})
default: null
},
/** @Deprecated */
showAlertInfo: {
Expand Down Expand Up @@ -254,7 +254,7 @@ export default {
}
if (k === 'rowSelection') {
if (showAlert && this.rowSelection) {
// 重新绑定 rowSelection 事件
// 如果需要使用alert,则重新绑定 rowSelection 事件
props[k] = {
selectedRows: this.selectedRows,
selectedRowKeys: this.selectedRowKeys,
Expand All @@ -264,10 +264,11 @@ export default {
}
}
return props[k]
} else if (!this.rowSelection) {
// 如果没打算开启 rowSelection 则清空默认的选择项
props[k] = null
return props[k]
}
// 如果没打算开启 rowSelection 则清空默认的选择项
props[k] = null
return props[k]
}
props[k] = this[k]
return props[k]
Expand Down

0 comments on commit 68ddd4f

Please sign in to comment.