Skip to content

Getting stale data from Form when format/ do a data massage on blur event.  #2569

Open
@jagatjeevan

Description

@jagatjeevan

Hello Team,

When we want to format data before sending it to the parent component, we are getting stale data.

In an input textbox, post editing, we are trimming the data and sending it to the parent form component. We are calling "onchange" method so that we can get the data and then calling "onblur" so that we can take certain actions.

Expected

On change method to be called and then onBlur method should be called. But on change is called later and then on blur is called.

Repo / Link

 https://github.com/jagatjeevan/explore-react-json-schema-form 
It is a simple react application and would run with just 2 commands.

  • npm install
  • npm start

Move to the route '/combined-form'. Here we have mentioned the steps to reproduce.
Has anyone faced similar issues? Any fixes or different approaches to tackle the issue.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions