浏览代码

fix: Form Field label for attribute not right when setting id, close #683

pointhalo 3 年之前
父节点
当前提交
12d32f5f12
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/semi-ui/form/hoc/withField.tsx

+ 1 - 1
packages/semi-ui/form/hoc/withField.tsx

@@ -499,7 +499,7 @@ function withField<
                         text={label || field}
                         id={labelId}
                         required={required}
-                        name={name || field}
+                        name={a11yId || name || field}
                         width={mergeLabelWidth}
                         align={mergeLabelAlign}
                         {...needSpread}