Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
micahjon committed Nov 7, 2023
1 parent 8b94022 commit f287857
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ type FormSchema = z.infer<typeof formSchema>;
const conditions: FieldConditions<FormSchema> = {
// Show "Other Caterer" if "Other" option is selected
otherCaterer: getValues => getValues("caterer") === "Other",
// Show "Wine" options for guests over 21. # stands in for "current" index
["guests.#.wine"]: getValues => getValues("guests.#.age") === "21+",
// Show "Wine" options for guests over 21
// Note: "#" stands in for "current" index
["guests.#.wine"]: getValues => getValues("guests.#.age") >= 21,
};

export function Form() {
Expand Down

0 comments on commit f287857

Please sign in to comment.