mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 13:47:02 +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;
|
const haveColon = computedColon && !vertical;
|
||||||
// Remove duplicated user input colon
|
// Remove duplicated user input colon
|
||||||
if (haveColon && typeof label === 'string' && (label as string).trim() !== '') {
|
if (haveColon && typeof label === 'string' && (label as string).trim() !== '') {
|
||||||
labelChildren = (label as string).replace(/[:|:]\s*$/, '');
|
labelChildren = (label as string).replace(/[::]\s*$/, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
const labelClassName = classNames({
|
const labelClassName = classNames({
|
||||||
|
Loading…
Reference in New Issue
Block a user