Skip to content

Commit 94e361a

Browse files
committed
fix: update onAiCreatedRuleAppliedRef to correctly close accordions
1 parent b7fa010 commit 94e361a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation

x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,13 @@ const CreateRulePageComponent: React.FC<{}> = () => {
338338
isAiRuleAppliedRef.current = true;
339339
const o = openStepsRef.current;
340340
if (o[RuleStep.defineRule]) {
341-
toggleStepAccordionRef.current(RuleStep.defineRule);
341+
handleAccordionToggle(RuleStep.defineRule, false);
342342
}
343343
if (o[RuleStep.aboutRule]) {
344-
toggleStepAccordionRef.current(RuleStep.aboutRule);
344+
handleAccordionToggle(RuleStep.aboutRule, false);
345345
}
346346
if (o[RuleStep.scheduleRule]) {
347-
toggleStepAccordionRef.current(RuleStep.scheduleRule);
347+
handleAccordionToggle(RuleStep.scheduleRule, false);
348348
}
349349

350350
await Promise.all([

0 commit comments

Comments
 (0)