-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Retain "None" Option in Technical User Setup After Submission #1039
Changes from 2 commits
56f957c
714bab6
93534ee
0a30461
0097d15
8c70dc3
2aeb9d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,7 +143,13 @@ export default function TechnicalIntegration() { | |
) | ||
|
||
useEffect(() => { | ||
setTechUserProfiles(userProfiles) | ||
if (userProfiles.length > 0) { | ||
setTechUserProfiles(userProfiles) | ||
} else { | ||
// Set default value as "None" when user profiles don't have any roles | ||
// Initially, value is "None" | ||
setTechUserProfiles([technicalUserNone]) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better use ? : instead of if-else here:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @oyo, But anyway I will make these changes. 🙂 |
||
}, [userProfiles]) | ||
|
||
const defaultValues = { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has been added in the wrong place. Put this at the top.
title should be "unreleased"