Skip to content

Commit 9302c70

Browse files
committed
switch to clearing draft on unmount
1 parent 03b851d commit 9302c70

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/pages/workspace/categories/CategoryFlagAmountsOverPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ function CategoryFlagAmountsOverPage({
4545
const decodedCategoryName = getDecodedCategoryName(categoryName);
4646

4747
useEffect(() => {
48-
clearDraftValues(ONYXKEYS.FORMS.WORKSPACE_CATEGORY_FLAG_AMOUNTS_OVER_FORM);
48+
return () => {
49+
clearDraftValues(ONYXKEYS.FORMS.WORKSPACE_CATEGORY_FLAG_AMOUNTS_OVER_FORM);
50+
};
4951
}, []);
5052

5153
const {inputCallbackRef} = useAutoFocusInput();

0 commit comments

Comments
 (0)