Merge pull request #1822 from RaoHai/checkboxZeroChildren

Checkbox will show its label while label equals number 0.
This commit is contained in:
RaoHai 2016-05-24 13:55:38 +08:00
commit ae7476a3f9

View File

@ -17,7 +17,7 @@ export default class Checkbox extends React.Component {
return (
<label className={classString} style={style}>
<RcCheckbox {...restProps} prefixCls={prefixCls} children={null} />
{children ? <span>{children}</span> : null}
{children !== undefined ? <span>{children}</span> : null}
</label>
);
}