Skip to content

Add options for automatically accepting pending values #88

@10xjs

Description

@10xjs

Some use cases may want incoming values to automatically replace current values. Add a nextValuesPolicy or similar field to useForm() config to control this behavior.

possible behaviors:

  • accept: automatically accept all incoming values
  • reject: automatically reject all incoming values (this would make the values prop behave as an "initialValues" prop)
  • default: current behavior, each field derives a detached state and offers accept and reject callbacks
  • acceptPristine: automatically accept all incoming values on fields that have not been edited and are not focused
  • callback funciton: some kind of user defined callback, interface TBD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions