From 226e60d0be5d6e81aa5afc2ddde4f50150447581 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sat, 20 Feb 2016 10:48:25 +0800 Subject: [PATCH] fix #278 --- src/BootstrapTable.js | 6 +++++- src/TableBody.js | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/BootstrapTable.js b/src/BootstrapTable.js index 0aa6bb798..355f4abe7 100644 --- a/src/BootstrapTable.js +++ b/src/BootstrapTable.js @@ -664,7 +664,11 @@ BootstrapTable.propTypes = { pagination: React.PropTypes.bool, searchPlaceholder: React.PropTypes.string, selectRow: React.PropTypes.shape({ - mode: React.PropTypes.string, + mode: React.PropTypes.oneOf([ + Const.ROW_SELECT_NONE, + Const.ROW_SELECT_SINGLE, + Const.ROW_SELECT_MULTI + ]), bgColor: React.PropTypes.string, selected: React.PropTypes.array, onSelect: React.PropTypes.func, diff --git a/src/TableBody.js b/src/TableBody.js index 547d68361..81034d8e4 100644 --- a/src/TableBody.js +++ b/src/TableBody.js @@ -284,8 +284,8 @@ class TableBody extends React.Component{ } _isSelectRowDefined(){ - return this.props.selectRow.mode == Const.ROW_SELECT_SINGLE || - this.props.selectRow.mode == Const.ROW_SELECT_MULTI; + return this.props.selectRow.mode === Const.ROW_SELECT_SINGLE || + this.props.selectRow.mode === Const.ROW_SELECT_MULTI; } } TableBody.propTypes = {