Skip to content

Ability to reset $isDirty flag

Choose a tag to compare

@tvillaren tvillaren released this 04 Mar 14:45
· 8 commits to master since this release

This releases adds the following:

  • preventDirtyFlag option
    You can now pass the preventDirtyFlag: true option to any update or insertOrUpdate call to prevent the $isDirty flag from being set to true for this specific action / mutation.
User.update({
    data: myUserToUpdate,
    preventDirtyFlag: true
});
  • resetAllDirtyFlags action
    This action will run through all the entities marked as dirty in your store and set the corresponding flag to false.
store.dispatch['entities/resetAllDirtyFlags']({}, { root: true });