Browse Source

Fix label colon with whitespace: `label="xx: "`

pull/2274/head
afc163 9 years ago
parent
commit
1f0c26b25a
  1. 2
      components/form/FormItem.jsx

2
components/form/FormItem.jsx

@ -165,7 +165,7 @@ export default class FormItem extends React.Component {
// remove user input colon
let label = props.label;
if (typeof label === 'string' && label.trim() !== '') {
label = props.label.replace(/:|:$/, '');
label = props.label.replace(/[:|:]\s*$/, '');
}
return props.label ? (

Loading…
Cancel
Save