--- title: Wire Controller Field Props Correctly for UI Libraries impact: HIGH impactDescription: prevents a control that renders correctly but never writes back to the form tags: ctrl, Controller, field-props, ui-libraries --- ## Wire Controller Field Props Correctly for UI Libraries Different UI libraries expect different prop names. Map Controller's field props correctly: `onChange` sends data back, `onBlur` reports interaction, `value` sets the display, `ref` enables focus on error. **Incorrect (spreading field on incompatible component):** ```typescript function FormWithSelect({ control }: { control: Control }) { return ( ( United States United Kingdom )} /> ) } ``` **Common mappings by library:** - MUI Select: `value`, `onChange` (receives event) - Radix/shadcn Select: `value`, `onValueChange` (receives value directly) - React Select: `value`, `onChange` (receives option object) Reference: [useController](https://react-hook-form.com/docs/usecontroller)