Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/nasty-garlics-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@wso2is/admin.applications.v1": patch
"@wso2is/console": patch
---

Sets the script to the default script instead of an empty string when reseting adaptive script
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020-2024, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2020-2026, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -565,7 +565,11 @@ export const ScriptBasedFlow: FunctionComponent<AdaptiveScriptsPropsInterface> =
};

const resetAdaptiveScriptTemplateToDefaultHandler = () => {
setSourceCode("");
const defaultScript: string[] = AdaptiveScriptUtils.generateScript(authenticationSteps + 1);

setSourceCode(defaultScript);
setInternalScript(defaultScript.join(ApplicationManagementConstants.LINE_BREAK));
setInternalStepCount(authenticationSteps);
setIsScriptFromTemplate(false);
onAdaptiveScriptReset();
onConditionalAuthenticationToggle(false);
Expand Down
Loading