Skip to content

Commit

Permalink
fix: ensure radio fields are functional inside arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Dec 15, 2024
1 parent 00ccd1d commit 7736294
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/core/components/AutoField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,17 @@ function AutoFieldInternal<
const Render = render[field.type] as (props: FieldProps) => ReactElement;

return (
<div className={getClassNameWrapper()} onFocus={onFocus} onBlur={onBlur}>
<div
className={getClassNameWrapper()}
onFocus={onFocus}
onBlur={onBlur}
onClick={(e) => {
// Prevent propagation of any click events to parent field.
// For example, a field within an array may bubble an event
// and fail to stop propagation.
e.stopPropagation();
}}
>
<Render {...mergedProps}>{children}</Render>
</div>
);
Expand Down

0 comments on commit 7736294

Please sign in to comment.