Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function FieldComponent<
}

return renderComponent(
{ children, component, ...rest, ...field },
{ children, component, ...field, ...rest },
{},
Comment on lines 88 to 90
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Add a regression test for input prop override.

Please add a test that passes input={{ value: "foo" }} to <Field> and asserts the rendered component receives it, so this regression doesn’t return.

🤖 Prompt for AI Agents
In `@src/Field.tsx` around lines 88 - 90, Add a regression test to ensure the
Field component forwards an input prop override: write a test that renders the
Field component (the component that calls renderComponent) with prop input={{
value: "foo" }} and a simple stub child/component, then assert the rendered
child/component receives that exact input prop (e.g., via props or DOM output)
to prevent future regressions in the renderComponent call path. Target the Field
component (the function that returns renderComponent({ children, component,
...field, ...rest }, {})) and verify the forwarded input prop is preserved.

`Field(${name})`,
);
Expand Down
Loading