Skip to content

Commit

Permalink
Merge pull request #6954 from pavinduLakshan/fix_role_switch_edge_case
Browse files Browse the repository at this point in the history
  • Loading branch information
pavinduLakshan authored Oct 3, 2024
2 parents 094ab0f + 10515cf commit c839daa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/famous-rockets-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/admin.roles.v2": patch
---

Fix roles dropdown being shown on selecting application roles option and discarding confirmation.
6 changes: 5 additions & 1 deletion features/admin.roles.v2/components/application-roles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,10 @@ export const ApplicationRoles: FunctionComponent<ApplicationRolesSettingsInterfa
</Grid>
</EmphasizedSegment>
<ConfirmationModal
onClose={ (): void => setShowSwitchAudienceWarning(false) }
onClose={ (): void => {
setTempRoleAudience(undefined);
setShowSwitchAudienceWarning(false);
} }
type="negative"
open={ showSwitchAudienceWarning }
assertionHint={ t("extensions:develop.applications.edit.sections." +
Expand All @@ -488,6 +491,7 @@ export const ApplicationRoles: FunctionComponent<ApplicationRolesSettingsInterfa
primaryAction={ t("common:confirm") }
secondaryAction={ t("common:cancel") }
onSecondaryActionClick={ (): void => {
setTempRoleAudience(undefined);
setShowSwitchAudienceWarning(false);
} }
onPrimaryActionClick={ (): void => {
Expand Down

0 comments on commit c839daa

Please sign in to comment.