mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
fix FormItem help and extra render
This commit is contained in:
parent
1d72c8abcc
commit
0858413691
@ -40,16 +40,16 @@ class FormItem extends React.Component {
|
||||
const props = this.props;
|
||||
const prefixCls = props.prefixCls;
|
||||
const help = this.getHelpMsg();
|
||||
return (
|
||||
<div className={!!help ? prefixClsFn(prefixCls, 'explain') : ''} key="help">
|
||||
{ help }
|
||||
return help ? (
|
||||
<div className={prefixClsFn(prefixCls, 'explain')} key="help">
|
||||
{help}
|
||||
</div>
|
||||
);
|
||||
) : null;
|
||||
}
|
||||
|
||||
renderExtra() {
|
||||
const { prefixCls, extra } = this.props;
|
||||
return <div className={prefixClsFn(prefixCls, 'extra')}>{extra}</div>;
|
||||
return <span className={prefixClsFn(prefixCls, 'extra')}>{extra}</span>;
|
||||
}
|
||||
|
||||
getValidateStatus() {
|
||||
|
Loading…
Reference in New Issue
Block a user