vue-dynamic-forms icon indicating copy to clipboard operation
vue-dynamic-forms copied to clipboard

Improvements on Events API

Open alvarosabu opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. Extend current info available through events + adding more granularity on individual events to the parent container

Describe the solution you'd like

  • Events API Changes (global):
    • @valid will return the current status of the form no matter if validation was forced or not
    • @force will return if the current form validation was forced or not
    • @submit will remain the same
    • @error will return an object with all control errors no matter if submit event was triggered (for this option, see @submit-error)
    • @submit-error: will be triggered only if form is submitted and it's invalid
    • @touch: will return an object with all controls that have touched as true.
    • @dirty: will return an object with all controls that have dirty as true.
  • Individual Events (new)
    • @input-change: will be triggered when a control value was modified and it will return both control name and value
    • @input-focus: will be triggered when a control is focus and it will return both control name and touched property
    • @input-blur: will be triggered when a control is focus and it will return both control name and touched property
    • @input-validate: will be triggered when a control is validated and it will return both control name and valid & errors

alvarosabu avatar Feb 08 '21 16:02 alvarosabu