Skip to content

Respect changes made in onItemUpdating callback #1233 - #1234

Open
koljada wants to merge 1 commit into
tabalinas:masterfrom
koljada:master
Open

Respect changes made in onItemUpdating callback #1233#1234
koljada wants to merge 1 commit into
tabalinas:masterfrom
koljada:master

Conversation

@koljada

@koljada koljada commented Feb 13, 2019

Copy link
Copy Markdown

Allow modifying an item inside onItemUpdating callback

@koljada koljada changed the title Master Respect changes made in onItemUpdating callback #1233 Feb 13, 2019
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant