From a0fdc0b9c44842207e4ac703e3859e796e3e1cb7 Mon Sep 17 00:00:00 2001 From: neodk2004 Date: Sat, 6 Jun 2026 10:42:22 +0200 Subject: [PATCH] =?UTF-8?q?fix(01-03):=20resolve=20species/breed=20name=20?= =?UTF-8?q?directly=20from=20list=20in=20trigger=20=E2=80=94=20bypass=20Ra?= =?UTF-8?q?dix=20SelectValue=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/pet/PetForm.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/pet/PetForm.tsx b/src/components/pet/PetForm.tsx index 6b586e6..284f6c1 100644 --- a/src/components/pet/PetForm.tsx +++ b/src/components/pet/PetForm.tsx @@ -225,7 +225,9 @@ export function PetForm({ className="w-full" aria-invalid={!!errors.speciesId} > - + + {speciesList.find((s) => s.id === field.value)?.name ?? "Select species"} + {speciesList.map((species) => ( @@ -265,13 +267,13 @@ export function PetForm({ className="w-full" disabled={!selectedSpeciesId} > - + {field.value + ? (breedList.find((b) => b.id === field.value)?.name ?? "Select breed (optional)") + : selectedSpeciesId ? "Select breed (optional)" - : "Select a species first" - } - /> + : "Select a species first"} + {breedList.length === 0 ? (