mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
fix: both of undefined and null means no input, close: #2959
This commit is contained in:
parent
2bd05aeb2b
commit
44d5fc6fd2
@ -120,7 +120,7 @@ export default class FormItem extends React.Component<FormItemProps, any> {
|
|||||||
return 'validating';
|
return 'validating';
|
||||||
} else if (!!getFieldError(field)) {
|
} else if (!!getFieldError(field)) {
|
||||||
return 'error';
|
return 'error';
|
||||||
} else if (getFieldValue(field) !== undefined) {
|
} else if (getFieldValue(field) !== undefined && getFieldValue(field) !== null) {
|
||||||
return 'success';
|
return 'success';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
|
@ -109,7 +109,7 @@ export default class Header extends React.Component {
|
|||||||
const url = `/components/${pathSnippet}`;
|
const url = `/components/${pathSnippet}`;
|
||||||
const subtitle = meta.subtitle || meta.chinese;
|
const subtitle = meta.subtitle || meta.chinese;
|
||||||
return (
|
return (
|
||||||
<Option value={url} key={url} data-label={`${(meta.title || meta.english).toLowerCase()} ${meta.subtitle || meta.chinese}`}>
|
<Option value={url} key={url} data-label={`${(meta.title || meta.english).toLowerCase()} ${subtitle || ''}`}>
|
||||||
<strong>{meta.title || meta.english}</strong>
|
<strong>{meta.title || meta.english}</strong>
|
||||||
{subtitle && <span className="ant-component-decs">{subtitle}</span>}
|
{subtitle && <span className="ant-component-decs">{subtitle}</span>}
|
||||||
</Option>
|
</Option>
|
||||||
|
Loading…
Reference in New Issue
Block a user