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

[form] errorState is not recomputed properly #130

Closed
tlouisse opened this issue Jun 27, 2019 · 0 comments · Fixed by #140
Closed

[form] errorState is not recomputed properly #130

tlouisse opened this issue Jun 27, 2019 · 0 comments · Fixed by #140
Labels
bug Something isn't working

Comments

@tlouisse
Copy link
Member

Description

Having an lion-form with one lion-input marked as required, when this lion-input stops being rendered the form shouldn't reflect an error state.

Expected Behavior

lion-form can unregister inputs that stops being rendered in the form, so then the errorState is correct when the form is submitted.

Current Behavior

lion-form doesn't unregister inputs that stops being rendered in the form, so then the errorState doesn't reflect the real situation.

Steps to Reproduce

I have created a web component and a test for reproducing the bug, here the steps in the case that you want to test it manually:

1- Click Submit, errorState should be true because the ing-input "name" is required.

2- Click in the button Toggle is name visible

3- The ing-input "name" is not rendered anymore

4- Click Submit, the errorState should be false since there isn't any required input within the form

@tlouisse tlouisse added the bug Something isn't working label Jun 27, 2019
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

Successfully merging a pull request may close this issue.

1 participant