final-form / final-form/react-final-form

Parse function should have access to the last value

Open
#192 4 comments 6 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
PR merge metrics
No merged PRs in 30d

Description

### Are you submitting a **bug report** or a **feature request**?
Feature request.

### What is the current behavior?
The API for the `parse` function doesn't provide the value before the change.

```parse?: ((value: any, name: string) => any) | null```

### What is the expected behavior?
I think we should have access to the value before the change at the `parse` function, or we should have another function on the value lifecycle. This would make possible stuff like creating an [`redux-form-input-masks`](https://github.com/renato-bohler/redux-form-input-masks) adaptor to use with `react-final-form`.

I'm currently experimenting some stuff on [this sandbox](https://codesandbox.io/s/lx226020jz).

### What's your environment?
react-final-form@3.1.4
final-form@4.3.1
redux-form-input-masks@1.0.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.