From 87300ff5d889535dde01e21dc8f8846ed7ec1b5e Mon Sep 17 00:00:00 2001 From: Shashank Agarwal <53386582+Corbe30@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:01:04 +0000 Subject: [PATCH] fixed: calculate formula args --- packages/react/src/components/Workbook/api.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/react/src/components/Workbook/api.ts b/packages/react/src/components/Workbook/api.ts index 0c78790b..b93ed2db 100644 --- a/packages/react/src/components/Workbook/api.ts +++ b/packages/react/src/components/Workbook/api.ts @@ -312,11 +312,9 @@ export function generateAPIs( handleUndo, handleRedo, - calculateFormula: () => { + calculateFormula: (id?: string, range?: SingleRange) => { setContext((draftCtx) => { - _.forEach(draftCtx.luckysheetfile, (sheet_obj) => { - api.calculateFormula(draftCtx, sheet_obj.id as string); - }); + api.calculateFormula(draftCtx, id, range); }); },