This repository was archived by the owner on Apr 12, 2024. It is now read-only.
fix(form): make ngForm $pristine after nested control.$setPristine() (counter version)#13773
Open
linoleum-js wants to merge 2 commits intoangular:masterfrom
Open
fix(form): make ngForm $pristine after nested control.$setPristine() (counter version)#13773linoleum-js wants to merge 2 commits intoangular:masterfrom
linoleum-js wants to merge 2 commits intoangular:masterfrom
Conversation
When calling $setPristine on the nested form or control, form becomes $pristine of all the nested controls are pristine Closes angular#13715
test/ng/directive/formSpec.js
Outdated
Member
There was a problem hiding this comment.
You should change this to expect(form.$dirty).toBe(false); and remove the subsequent call to form.$setPristine().
Member
|
It generally LGTM (with a couple of nitpicks), BUT: We need to properly handle added/removed controls. |
70049ae to
b77e14b
Compare
Author
|
Now it uses internal counter. It's a bit complicated, because we have to divide |
Member
|
I think it's best to have the two alternative approaches as two independent PRs (so we can review/update/decide upon separately). Thx @linoleum-js for working on this, btw 👍 |
Contributor
|
Has this been split? |
lucasmaj
approved these changes
May 12, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When calling $setPristine on the nested form or control,
form becomes $pristine of all the nested controls are pristine
Closes #13715