File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { TooltipContent } from './TooltipContent';
1818export type FormElementProps = {
1919 id ?: string ;
2020 className ?: string ;
21+ htmlFor ?: string ;
2122 label ?: string ;
2223 required ?: boolean ;
2324 error ?: boolean | string | { message : string } ;
@@ -43,6 +44,7 @@ export const FormElement = createFC<
4344 const {
4445 id,
4546 className,
47+ htmlFor,
4648 cols = 1 ,
4749 elementRef,
4850 label,
@@ -96,8 +98,9 @@ export const FormElement = createFC<
9698 < div ref = { elementRef } className = { formElementClassNames } >
9799 { label ? (
98100 < LabelTag
101+ id = { id }
99102 className = 'slds-form-element__label'
100- htmlFor = { id }
103+ htmlFor = { htmlFor }
101104 onClick = { id ? undefined : onClickLabel }
102105 >
103106 { required ? (
You can’t perform that action at this time.
0 commit comments