Skip to content

Commit

Permalink
Merge pull request #53249 from huult/52399-fix-retain-description-hin…
Browse files Browse the repository at this point in the history
…t-after-reenabling-require-description

Fix: Description hint field shows previous data after reenabling 'Req…
  • Loading branch information
lakchote authored Jan 3, 2025
2 parents a3e293f + d1eaf4e commit 182cab7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/workspace/categories/CategorySettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,12 @@ function CategorySettingsPage({
<Switch
isOn={policyCategory?.areCommentsRequired ?? false}
accessibilityLabel={translate('workspace.rules.categoryRules.requireDescription')}
onToggle={() => Category.setPolicyCategoryDescriptionRequired(policyID, categoryName, !areCommentsRequired)}
onToggle={() => {
if (policyCategory.commentHint && areCommentsRequired) {
Category.setWorkspaceCategoryDescriptionHint(policyID, categoryName, '');
}
Category.setPolicyCategoryDescriptionRequired(policyID, categoryName, !areCommentsRequired);
}}
/>
</View>
</View>
Expand Down

0 comments on commit 182cab7

Please sign in to comment.