Skip to content

Commit

Permalink
clone the object to be modified (#12583)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanrenmsft authored Sep 23, 2020
1 parent 4a08913 commit e1235a7
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -886,13 +886,14 @@ export class EditDataGridPanel extends GridParentComponent {
}

loadValue(item, rowNumber): void {
const itemForDisplay = deepClone(item);
if (self.overrideCellFn) {
let overrideValue = self.overrideCellFn(rowNumber, this._args.column.id, item[this._args.column.id]);
let overrideValue = self.overrideCellFn(rowNumber, this._args.column.id, itemForDisplay[this._args.column.id]);
if (overrideValue !== undefined) {
item[this._args.column.id] = overrideValue;
itemForDisplay[this._args.column.id] = overrideValue;
}
}
this._textEditor.loadValue(item);
this._textEditor.loadValue(itemForDisplay);
}

serializeValue(): string {
Expand Down

0 comments on commit e1235a7

Please sign in to comment.