Skip to content

Commit

Permalink
fix(formula): paste formula only with no style
Browse files Browse the repository at this point in the history
  • Loading branch information
Dushusir committed Jun 12, 2024
1 parent 41ef7d7 commit b903ce9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,10 @@ export function getSetCellFormulaMutations(
const originalFormulaId = value.si || '';

let valueObject: ICellDataWithSpanInfo = {};
// Paste the formula only, you also need to process some regular values
// Paste the formula only, you also need to process some regular values, but style information is not needed
if (isSpecialPaste) {
valueObject = Tools.deepClone(value);
valueObject.s = null;
}

if (!copyRowLength || !copyColumnLength) {
Expand All @@ -180,8 +181,6 @@ export function getSetCellFormulaMutations(
valueObject.f = shiftedFormula;
valueObject.v = null;
valueObject.p = null;

// TODO handle as normal formula string
} else {
valueObject.si = originalFormulaId;
valueObject.f = null;
Expand Down

0 comments on commit b903ce9

Please sign in to comment.