Skip to content

Form still dirty after initialize(formName, newData, true) #1902

@ncphillips

Description

@ncphillips

We're using redux form to edit some pages, and I'm having some trouble re-initializing the form after saving.

The submit callback is

const mapDispatchToProps = (dispatch) => ({
 submit: (page) => dispatch(updatePage(page)).then((page) => {
      dispatch(initialize(`page/${page.slug}`, page, false));
      dispatch(reset(`page/${page.slug}`));
      return page;
    });
});

This seems to be working as expected. The current and initial values for the form are equal, however the dirty flag is set to 'true' until I reload the page.

Any ideas on why this might be happening?

This seems to be effecting the state as I expected, the form values stay the same, but the

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