grommet / grommet

a react-based framework that provides accessibility, modularity, responsiveness, and theming in a tidy package
https://grommet.io
Apache License 2.0
8.35k stars 1.03k forks source link

Form should run validation when it's set from outside the form #5961

Open vmaark opened 2 years ago

vmaark commented 2 years ago

Expected Behavior

If I have a button which changes the form's content, validation logic won't run.

Actual Behavior

When change is the validation trigger, and I have a button which updates the field to a different value, it won't trigger the validation.

URL, screen shot, or Codepen exhibiting the issue

https://codesandbox.io/s/hopeful-poitras-i32fk?file=/src/Form.js

Steps to Reproduce

The above form expects numeric input

  1. Press the button to add text
  2. no validation is applied
narayand16 commented 2 years ago

I can see the PR for this issue is already merged. What causing the issue to still pop up its head ? ;)

jcfilben commented 2 years ago

The pull request that is showing up in this issue wasn't a pull request made on Grommet. The pull request is just on a repo using Grommet and they mentioned this issue in it. I believe this issue is not fixed yet.