feat(forms): add custom equality function for signal forms - #70299
Open
brysonbw wants to merge 1 commit into
Open
feat(forms): add custom equality function for signal forms#70299brysonbw wants to merge 1 commit into
brysonbw wants to merge 1 commit into
Conversation
Allow Signal Forms fields to use custom equality functions for programmatic updates. Preserve equivalent object values, including Temporal.PlainDate.
brysonbw
force-pushed
the
feat-signal-forms-equal-function-69928
branch
from
August 20, 2026 18:10
aa08656 to
2a6795a
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Signal Forms currently use reference equality for object values. If a new object instance represents the same logical value, the form still treats it as a change and updates dependent signals
Issue Number: #69928
What is the new behavior?
Adds a custom
equality()rule that allows callers to define custom value comparison logic for fields:Does this PR introduce a breaking change?
Other information
Extracted the shared, dependency-free metadata primitives (
MetadataKey,MetadataReducer,createMetadataKey,IS_ASYNC_VALIDATION_RESOURCE,LimitKey,LimitSelectionKey,MetadataSetterType) into a newschema/metadata.tsmodule. This decoupling is required (imo) because the newEQUALITYMetadataKeyneeds to be read directly within the schema layer (schema/logic_node.ts) to retrieve the configured equality function during change detection