Fix filter menu value type

This commit is contained in:
afc163 2016-04-12 19:43:10 +08:00
parent 22591af2f6
commit 9a7a620ec7

View File

@ -48,7 +48,7 @@ let FilterMenu = React.createClass({
renderMenuItem(item) { renderMenuItem(item) {
return ( return (
<MenuItem key={item.value}> <MenuItem key={item.value}>
<Checkbox checked={this.state.selectedKeys.indexOf(item.value) >= 0} /> <Checkbox checked={this.state.selectedKeys.indexOf(item.value.toString()) >= 0} />
{item.text} {item.text}
</MenuItem> </MenuItem>
); );
@ -63,7 +63,7 @@ let FilterMenu = React.createClass({
}); });
const subMenuCls = containSelected ? 'ant-dropdown-submenu-contain-selected' : ''; const subMenuCls = containSelected ? 'ant-dropdown-submenu-contain-selected' : '';
return ( return (
<SubMenu title={item.text} className={subMenuCls} key={item.value}> <SubMenu title={item.text} className={subMenuCls} key={item.value.toString()}>
{item.children.map(child => this.renderMenuItem(child))} {item.children.map(child => this.renderMenuItem(child))}
</SubMenu> </SubMenu>
); );