Make $.extend() calls non-recursive in _updateRow(). - #1102
Open
DanielRLevine wants to merge 1 commit into
Open
Conversation
rok9ru
added a commit
to rok9ru/jsxgrid
that referenced
this pull request
Aug 28, 2026
Deep merge ($.extend(true, ...)) recursively merged nested objects instead
of replacing them - wrong whenever a field's edited value is itself an
object (e.g. a date-range {from, to} value), since old and new nested keys
would get merged together instead of the new value replacing the old one.
Cherry-picked from upstream PR tabalinas#1102.
rok9ru
added a commit
to rok9ru/jsxgrid
that referenced
this pull request
Aug 28, 2026
…urce onItemUpdating's args.item was passed as updatedItem, so if a consumer's handler mutates args.item, that mutation is on updatedItem already; merging from the original editedItem instead silently discarded it. Reconciled by hand with the shallow-extend fix from tabalinas#1102, which touches this same line. Cherry-picked from upstream PR tabalinas#1234.
rok9ru
added a commit
to rok9ru/jsxgrid
that referenced
this pull request
Aug 28, 2026
… field editing Running the QUnit suite after cherry-picking tabalinas#1102 failed 'complex properties binding: updating deeply nested prop' - shallow $.extend drops sibling nested keys when two dot-path fields (e.g. 'complexProp.subprop1.prop1' and 'complexProp.subprop1.subprop2.prop12') share a nested ancestor, since it only merges top-level keys. That's a real, tested, documented feature (_setItemFieldValue builds genuinely nested objects for dot-path field names), so restoring deep $.extend(true, ...) for both merges in _updateRow. tabalinas#1234's actual fix (merge from the onItemUpdating-mutated updatedItem rather than the raw editedItem) is unaffected and stays.
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.
This will fix #1100.