-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Disable Required Toggle When No Subtags Are Enabled #48381
Changes from 1 commit
8c136f1
c76bef7
ade16d8
0656872
10af826
ec5e76e
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 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -231,7 +231,9 @@ function WorkspaceViewTagsPage({route}: WorkspaceViewTagsProps) { | |||||||||||||||||
/> | ||||||||||||||||||
); | ||||||||||||||||||
}; | ||||||||||||||||||
|
||||||||||||||||||
if (!Object.values(currentPolicyTag?.tags ?? {}).some((tag) => tag.enabled)) { | ||||||||||||||||||
Tag.setPolicyTagsRequired(policyID, false, route.params.orderWeight) | ||||||||||||||||||
} | ||||||||||||||||||
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.
Suggested change
In this case the 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. Got it, I will add the semicolon and adjust the spacing in this PR. I'll also make sure to run |
||||||||||||||||||
const navigateToEditTag = () => { | ||||||||||||||||||
Navigation.navigate(ROUTES.WORKSPACE_EDIT_TAGS.getRoute(route.params.policyID, currentPolicyTag?.orderWeight)); | ||||||||||||||||||
}; | ||||||||||||||||||
|
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.
Caution
There's currently an issue with the implementation which would block this from being merged, basically there's an infinite loop of the
setPolicyTagsRequired
call (see video below) which needs to be fixed such that:call-loop-issue.mov
cc @Shahidullah-Muffakir I will be able to pick-up the review and complete the checklist once the issue is fixed and the fix works as expected.
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.
Got it. We can update the condition to:
This will ensure the call is only made when needed and only once. I’ve tested it, and it works as expected. Let me know what you think. Thanks!
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.
@ikevin127 I pushed the changes, Please take a look when you can. Thanks!
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.
Thanks for addressing the issues, I'll move forward with the review!