Skip to content

Commit 508a9da

Browse files
committed
fix: add comment to align with blog post
1 parent 321be19 commit 508a9da

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/app/registration-form-2/registration-form-2.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export const formSchema = schema<RegisterFormData>((fieldPath) => {
104104
);
105105
}
106106
);
107+
108+
// Disable newsletter topics when newsletter is unchecked
107109
disabled(fieldPath.newsletterTopics, (ctx) => !ctx.valueOf(fieldPath.newsletter));
108110
});
109111

src/app/registration-form-3/registration-form-3.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ export const formSchema = schema<RegisterFormData>((fieldPath) => {
107107
);
108108
}
109109
);
110+
111+
// Disable newsletter topics when newsletter is unchecked
110112
disabled(fieldPath.newsletterTopics, (ctx) => !ctx.valueOf(fieldPath.newsletter));
111113

112114
// apply child schema for identity checks

0 commit comments

Comments
 (0)