final-form / final-form/react-final-form
formatOnBlur overloading format/parse original meaning
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
This API seems conceptually broken right now. With format & parse we have a nice parity:
- format maps a state value into a displayable value (happens during render)
- parse maps displayable value into a state value (happens in a callback)
formatOnBlur though prevents format from being called during render - which so far makes sense, but it calls format inside a callback. So the parity gets lost but this also makes parse weirdly unusable with this option - because it still also gets called inside a callback, so suddenly parse's and format's role is the same (?), they both write to state.
Not sure if the problem is recognizable from this vague description - if not please tell me so and I'll try explain it better.
Contributor guide
Assessment
This issue has not been assessed yet.