kettanaito/react-advanced-form

"form.reset()" removes fields that do not match the predicate

Closed this issue · 1 comments

Environment

  • react-advanaced-form: 1.6.2.

What

Current behavior

Similar to #333, reseting the fields deletes the ones that do not match the custom predicate.

Expected behavior

Fields that do not match the predicate are stored as-is.

Why

R.filter(predicate),

As opposed to proper mapping with conditional transformer:

R.map(R.when(predicate, recordUtils.reset(R.always('')))),

Fixed. Will be released since version 1.6.3.