Skip to content

Commit

Permalink
fix(richtext-*): use correct "for" attribute for label (#10036)
Browse files Browse the repository at this point in the history
Fixes #10034
  • Loading branch information
r1tsuu authored Dec 18, 2024
1 parent 97a1f4a commit 97c120a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/richtext-lexical/src/field/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const RichTextComponent: React.FC<
CustomComponent={Error}
Fallback={<FieldError path={path} showError={showError} />}
/>
{Label || <FieldLabel label={label} localized={localized} required={required} />}
{Label || <FieldLabel label={label} localized={localized} path={path} required={required} />}
<div className={`${baseClass}__wrap`}>
<ErrorBoundary fallbackRender={fallbackRender} onReset={() => {}}>
{BeforeInput}
Expand Down
2 changes: 1 addition & 1 deletion packages/richtext-slate/src/field/RichText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ const RichTextField: React.FC<LoadedSlateFieldProps> = (props) => {

return (
<div className={classes} style={styles}>
{Label || <FieldLabel label={label} required={required} />}
{Label || <FieldLabel label={label} path={path} required={required} />}
<div className={`${baseClass}__wrap`}>
<RenderCustomComponent
CustomComponent={Error}
Expand Down

0 comments on commit 97c120a

Please sign in to comment.