mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 19:50:05 +08:00
Merge pull request #17985 from shaodahong/fix-form-item-label-regexp
fix(Form.Item): fix label replace regexp err replace
This commit is contained in:
commit
ef8a6c6df8
@ -357,7 +357,7 @@ export default class FormItem extends React.Component<FormItemProps, any> {
|
||||
const haveColon = computedColon && !vertical;
|
||||
// Remove duplicated user input colon
|
||||
if (haveColon && typeof label === 'string' && (label as string).trim() !== '') {
|
||||
labelChildren = (label as string).replace(/[:|:]\s*$/, '');
|
||||
labelChildren = (label as string).replace(/[::]\s*$/, '');
|
||||
}
|
||||
|
||||
const labelClassName = classNames({
|
||||
|
Loading…
Reference in New Issue
Block a user