Skip to content

Commit fbb7834

Browse files
Update FormGroupLayoutLabel.tsx
added stop propagation on label instead of div
1 parent effe5ef commit fbb7834

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib/FormGroupLayoutLabel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const FormGroupLayoutLabel = <T extends FieldValues>(props: FormGroupLayoutLabel
3030
const checkboxLayout = layout === "checkbox";
3131

3232
return (
33-
<div onClick={(e) => e.stopPropagation()}>
34-
<Label check={checkboxLayout || switchLayout} for={fieldId} style={{ display: "flex", gap: 1 }}>
33+
<>
34+
<Label check={checkboxLayout || switchLayout} for={fieldId} style={{ display: "flex", gap: 1 }} onClick={(e) => e.stopPropagation()}>
3535
{finalLabel}
3636
{tooltip && (
3737
<svg
@@ -58,7 +58,7 @@ const FormGroupLayoutLabel = <T extends FieldValues>(props: FormGroupLayoutLabel
5858
{tooltip}
5959
</UncontrolledTooltip>
6060
)}
61-
</div>
61+
</>
6262
);
6363
};
6464

0 commit comments

Comments
 (0)