Skip to content

Commit 97c120a

Browse files
authored
fix(richtext-*): use correct "for" attribute for label (#10036)
Fixes #10034
1 parent 97a1f4a commit 97c120a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/richtext-lexical/src/field/Field.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const RichTextComponent: React.FC<
106106
CustomComponent={Error}
107107
Fallback={<FieldError path={path} showError={showError} />}
108108
/>
109-
{Label || <FieldLabel label={label} localized={localized} required={required} />}
109+
{Label || <FieldLabel label={label} localized={localized} path={path} required={required} />}
110110
<div className={`${baseClass}__wrap`}>
111111
<ErrorBoundary fallbackRender={fallbackRender} onReset={() => {}}>
112112
{BeforeInput}

packages/richtext-slate/src/field/RichText.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ const RichTextField: React.FC<LoadedSlateFieldProps> = (props) => {
313313

314314
return (
315315
<div className={classes} style={styles}>
316-
{Label || <FieldLabel label={label} required={required} />}
316+
{Label || <FieldLabel label={label} path={path} required={required} />}
317317
<div className={`${baseClass}__wrap`}>
318318
<RenderCustomComponent
319319
CustomComponent={Error}

0 commit comments

Comments
 (0)