jsun969 / react-hook-form-antd

๐Ÿ“‹๐Ÿœ Master your Ant Design form with React Hook Form! ็”จ React Hook Form ๆ‹ฟๆไฝ ็š„ Ant Design ่กจๅ•๏ผ
https://npm.im/react-hook-form-antd
MIT License
61 stars 10 forks source link

Antd select borders doesn't change on error #46

Open rin-st opened 12 months ago

rin-st commented 12 months ago

Component doesn't change status of antd Select depending on error

Expected behavior: passing status: 'error' to Select if field has error, so border will be red

ahmadnzr commented 10 months ago

Hi @rin-st , we have the same issue, but I have solved this issue by copying this component to my local (without changing) and creating my own component.

https://github.com/jsun969/react-hook-form-antd/blob/main/src/FormItem.tsx

and it works as it should.

rin-st commented 10 months ago

Thank you @ahmadnzr ! But I think it's not a solution. You'll need to do it on every update of the lib. I also found a solution using antd Form.Item + react-hook-form Controller, but with this lib it would be easier