mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
improve auto colon of FormItem
This commit is contained in:
parent
e91313efc1
commit
06f472a728
@ -164,7 +164,7 @@ export default class FormItem extends React.Component {
|
||||
|
||||
// remove user input colon
|
||||
let label = props.label;
|
||||
if (typeof props.label === 'string') {
|
||||
if (typeof label === 'string' && label.trim() !== '') {
|
||||
label = props.label.replace(/:|:$/, '');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user