Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(manager): initialize + keepDirtyOnReinitialize #720

Merged
merged 1 commit into from
Aug 18, 2020

Conversation

rvsia
Copy link
Contributor

@rvsia rvsia commented Aug 17, 2020

@rvsia rvsia added the State manager Form state manager packages. Will be used a state management package for the form renderer. label Aug 17, 2020
@rvsia rvsia changed the title [WIP] feat(manager): initialize feat(manager): initialize + keepDirtyOnReinitialize Aug 18, 2020
@rvsia rvsia requested a review from Hyperkid123 August 18, 2020 07:01
@codecov
Copy link

codecov bot commented Aug 18, 2020

Codecov Report

Merging #720 into state-manager will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                Coverage Diff                @@
##           state-manager     #720      +/-   ##
=================================================
+ Coverage          93.13%   93.18%   +0.04%     
=================================================
  Files                220      220              
  Lines               3613     3639      +26     
  Branches            1138     1145       +7     
=================================================
+ Hits                3365     3391      +26     
  Misses               248      248              
Impacted Files Coverage Δ
...ckages/form-state-manager/src/utils/manager-api.ts 96.87% <100.00%> (+0.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbbbcc8...c48b888. Read the comment docs.


managerApi().initialize({ foo: { bar: 'foobar' } });

expect(managerApi().pristine).toEqual(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a check that the field.meta.prisinte/dirty/touched/visited were reset as well?

@Hyperkid123 Hyperkid123 merged commit ec0dba0 into data-driven-forms:state-manager Aug 18, 2020
@rvsia rvsia deleted the initialize branch August 20, 2020 12:03
@Hyperkid123
Copy link
Member

🎉 This PR is included in version 3.1.0 🎉

The release is available on

Demo can be found here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released State manager Form state manager packages. Will be used a state management package for the form renderer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants