-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Closed
Copy link
Labels
bugissue that does not match design or documentation and requires code changes to addressissue that does not match design or documentation and requires code changes to address
Description
Expected Behavior
When the checkbox is unselected, a new required TextInput field appears added. Then form was invalid as expected. (As no value entered for new filed).
But when I toggled back the checkbox , the TextInput was removed from , But still the i was getting form was invalid from onValidate method , This is the issue.
I saw the similar issue was closed #4743 but still am able to reproduce.
Actual Behavior
When I dynamically removing the field , Then form status should be Valid only if all other validation are fine.
URL, screen shot, or Codepen exhibiting the issue
https://codesandbox.io/s/form-dynamic-fileds-e57mf5?file=/src/App.js
Steps to Reproduce
- See the code sand box and recorded GIF.
- conditionally show and hide an required field inside a form , check the expected form validation status
Your Environment
- Grommet version: Latest
- Browser Name and version: Chrome latest
- Operating System and version (desktop or mobile): Window & linux
Metadata
Metadata
Assignees
Labels
bugissue that does not match design or documentation and requires code changes to addressissue that does not match design or documentation and requires code changes to address