From 5cc87ede0b5cbab480f5fd400b3ba67e9c2895c5 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 7 Jun 2016 16:27:55 +0800 Subject: [PATCH] Move stopPropagation to wrapper, fix #1470 again --- components/table/demo/row-selection.md | 3 ++- components/table/index.jsx | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/components/table/demo/row-selection.md b/components/table/demo/row-selection.md index a05595d5fc..1de2c1315b 100644 --- a/components/table/demo/row-selection.md +++ b/components/table/demo/row-selection.md @@ -49,6 +49,7 @@ const rowSelection = { }, }; -ReactDOM.render( +ReactDOM.render( +
, mountNode); ```` diff --git a/components/table/index.jsx b/components/table/index.jsx index b82bb0fe2c..42b4b144ff 100644 --- a/components/table/index.jsx +++ b/components/table/index.jsx @@ -428,10 +428,12 @@ export default class Table extends React.Component { this.getDefaultSelection().indexOf(rowIndex) >= 0); } return ( - this.handleRadioSelect(record, rowIndex, e)} - value={rowIndex} checked={checked} - /> + + this.handleRadioSelect(record, rowIndex, e)} + value={rowIndex} checked={checked} + /> + ); } @@ -449,9 +451,13 @@ export default class Table extends React.Component { props = this.props.rowSelection.getCheckboxProps.call(this, record); } return ( - this.handleSelect(record, rowIndex, e)} - /> + + this.handleSelect(record, rowIndex, e)} + /> + ); }