Skip to content

formatOnBlur overloading format/parse original meaning #560

Open
@Andarist

Description

@Andarist

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions