Fix link in form item label

This commit is contained in:
afc163 2017-11-27 10:43:35 +08:00
parent 892de0c609
commit 61968b91cf

View File

@ -222,7 +222,7 @@ export default class FormItem extends React.Component<FormItemProps, any> {
return;
}
const controls = document.querySelectorAll(`[id="${id}"]`);
if (controls.length !== 1) {
if (controls.length > 1) {
e.preventDefault();
const control = findDOMNode(this).querySelector(`[id="${id}"]`) as HTMLElement;
if (control && control.focus) {