formio / formio.js

JavaScript powered Forms with JSON Form Builder
https://formio.github.io/formio.js
MIT License
1.89k stars 1.07k forks source link

Builder: missing builderFormValidityChange event on delete component #5791

Open rzorzorzo opened 2 months ago

rzorzorzo commented 2 months ago

Describe the bug Builder: when removing an invalid component, so that the form becomes valid, the lib should emit a builderFormValidityChange event

Version/Branch 5.0.0-rc.76

To Reproduce Steps to reproduce the behavior:

  1. open empty form in builder
  2. Add Input component
  3. Add another Input component with same api key
  4. Error is show and builderFormValidityChange event is emitted
  5. remove the second component
  6. Error is no longer shown, but no builderFormValidityChange event is emitted

Note: The arg of the event is not a boolean, as expected, but the form, from which it is not possible to get the validity state

Expected behavior builderFormValidityChange event is emitted

workaround: to check validity: .querySelector("[aria-invalid=true]") check validity on removeComponent event

lane-formio commented 1 month ago

Is this still happening on rc.88?