Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

What does feedback property do on Form.Input? #532

Open
SalahAdDin opened this issue Sep 3, 2020 · 0 comments
Open

What does feedback property do on Form.Input? #532

SalahAdDin opened this issue Sep 3, 2020 · 0 comments

Comments

@SalahAdDin
Copy link

More than an issue this is a question:

I'm passing the formik validation errors and the API fetching errors as Form.Input error and feedback properties, no any problem till here.

The problem comes when I pass the feedback and it is not showed in the page:
Screen Capture_select-area_20200903003803

When there is a formik validation error, it is showed normally and the input is also styled as it requires:
Screen Capture_select-area_20200903003638
And It is because if there is an error, the input receives the is-invalid, and state-invalid classes are passed to the control group, while feedback just gets the text but does not change the form control style:
Screen Capture_select-area_20200903003845

So, in order to get also the server errors, we had to pass it feedback error also to the error property:
Screen Capture_select-area_20200903005111

So, finally, what is the idea of the feedback property?

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant