Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Antd select borders doesn't change on error #46

Open
rin-st opened this issue Nov 15, 2023 · 2 comments
Open

Antd select borders doesn't change on error #46

rin-st opened this issue Nov 15, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@rin-st
Copy link

rin-st commented Nov 15, 2023

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

@rin-st rin-st changed the title Antd select borders doesn't change on erro Antd select borders doesn't change on error Nov 15, 2023
@jsun969 jsun969 added the bug Something isn't working label Nov 16, 2023
@ahmadnzr
Copy link

ahmadnzr commented Jan 1, 2024

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
Copy link
Author

rin-st commented Jan 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants