Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(sheets-conditional-formatting): apply conditional formatting for triggered sheet (#4798)

Sergey Makarovc3574ee2dc7e
diff --git a/packages/sheets-conditional-formatting/src/commands/commands/add-cf.command.ts b/packages/sheets-conditional-formatting/src/commands/commands/add-cf.command.ts
index 8caae0779d..0b8a9076e2 100644
--- a/packages/sheets-conditional-formatting/src/commands/commands/add-cf.command.ts
+++ b/packages/sheets-conditional-formatting/src/commands/commands/add-cf.command.ts
@@ -46,7 +46,7 @@ export const AddCfCommand: ICommand<IAddCfCommandParams> = {
const commandService = accessor.get(ICommandService);
const conditionalFormattingRuleModel = accessor.get(ConditionalFormattingRuleModel);
const univerInstanceService = accessor.get(IUniverInstanceService);
- const target = getSheetCommandTarget(univerInstanceService);
+ const target = getSheetCommandTarget(univerInstanceService, params);
if (!target) return false;
const { unitId, subUnitId } = target;