Repository navigation
refactor(forms): make markAsTouched() touch all descendants by default - #67453
Merged
Merged
Conversation
JeanMeche
reviewed
Mar 5, 2026
JeanMeche
reviewed
Mar 9, 2026
Member
|
Presubmit failures are unrelated, this is good to go |
atscott
force-pushed
the
sf-mark-all-as-touched
branch
from
March 11, 2026 17:42
df8423f to
5c1c201
Compare
`markAsTouched()` now marks all descendants as touched. In general this
method is called when controls update the model. Most controls update
leaf nodes, in which case this change has no effect.
Marking all descendants allows triggering validation for subsections of
a form, independently from having to call `submit()` on the entire form.
`markAsTouched()` now accepts a `MarkAsTouchedOptions` parameter, which
includes a `skipDescendants` property. This can be used mark only the
receiving field as touched: `node.markAsTouched({skipDescendants: true})`.
leonsenft
force-pushed
the
sf-mark-all-as-touched
branch
from
March 11, 2026 18:06
5c1c201 to
8f9f65c
Compare
Contributor
Author
|
Note for caretaker: ready for merge again |
Member
|
This PR has some conflicts with 21.2.x |
Member
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.

markAsTouched()now marks all descendants as touched. In general this method is called when controls update the model. Most controls update leaf nodes, in which case this change has no effect.Marking all descendants allows triggering validation for subsections of a form, independently from having to call
submit()on the entire form.markAsTouched()now accepts aMarkAsTouchedOptionsparameter, which includes askipDescendantsproperty. This can be used mark only the receiving field as touched:node.markAsTouched({skipDescendants: true}).