From c8f9c45bd8526514c19c9083a4e9637ae6f99679 Mon Sep 17 00:00:00 2001 From: Dave Armstrong Date: Wed, 20 Jul 2022 07:18:13 -0500 Subject: [PATCH 1/2] Updating keys to prevent react rendering errors. --- src-ts/lib/form/Form.tsx | 2 +- src-ts/lib/form/form-groups/FormGroups.tsx | 4 ++-- .../form/form-groups/form-card-set/FormCardSet.tsx | 13 ++++++------- src-ts/lib/form/form-groups/form-radio/index.tsx | 2 +- src-ts/lib/route-provider/route.provider.tsx | 2 +- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src-ts/lib/form/Form.tsx b/src-ts/lib/form/Form.tsx index 3b572f6f1..54ec1f0e5 100644 --- a/src-ts/lib/form/Form.tsx +++ b/src-ts/lib/form/Form.tsx @@ -121,7 +121,7 @@ const Form: (props: FormProps diff --git a/src-ts/lib/form/form-groups/FormGroups.tsx b/src-ts/lib/form/form-groups/FormGroups.tsx index a67702984..9ac4f40cf 100644 --- a/src-ts/lib/form/form-groups/FormGroups.tsx +++ b/src-ts/lib/form/form-groups/FormGroups.tsx @@ -100,8 +100,8 @@ const FormGroups: (props: FormGroupsProps) => JSX.Element = (props: FormGroupsPr ) } - const formGroups: Array = formDef?.groups?.map((element: FormGroup) => { - return + const formGroups: Array = formDef?.groups?.map((element: FormGroup, index: number) => { + return }) || [] return ( diff --git a/src-ts/lib/form/form-groups/form-card-set/FormCardSet.tsx b/src-ts/lib/form/form-groups/form-card-set/FormCardSet.tsx index ac5452b9f..665af51a1 100644 --- a/src-ts/lib/form/form-groups/form-card-set/FormCardSet.tsx +++ b/src-ts/lib/form/form-groups/form-card-set/FormCardSet.tsx @@ -25,23 +25,22 @@ const FormCardSet: React.FC = ({ name, cards, onChange, value return (
{ - cards?.map(card => { + cards?.map((card, index: number) => { const formattedPrice: string | undefined = textFormatMoneyLocaleString(card.price) const selected: boolean = value === card.id return ( - -