diff --git a/components/table/demo/row-selection.md b/components/table/demo/row-selection.md index 99671c3705..661dfc8a45 100644 --- a/components/table/demo/row-selection.md +++ b/components/table/demo/row-selection.md @@ -48,7 +48,7 @@ const rowSelection = { }, onSelectAll(selected, selectedRows, changeRows) { console.log(selected, selectedRows, changeRows); - } + }, }; ReactDOM.render( diff --git a/components/table/index.jsx b/components/table/index.jsx index d28a18dc08..84faba83ec 100644 --- a/components/table/index.jsx +++ b/components/table/index.jsx @@ -64,7 +64,7 @@ export default class Table extends React.Component { this.state = { // ε‡ε°‘ηŠΆζ€ - selectedRowKeys: props.selectedRowKeys || [], + selectedRowKeys: (props.rowSelection || {}).selectedRowKeys || [], filters: this.getFiltersFromColumns(), selectionDirty: false, ...this.getSortStateFromColumns(),