From c34e78e1bd420ec115f47387e73b9401bdf7f40f Mon Sep 17 00:00:00 2001 From: meganrm Date: Tue, 4 Nov 2025 10:56:12 -0800 Subject: [PATCH 1/5] recipe is selected but the id is displaying --- src/components/Dropdown/index.tsx | 17 ++-- src/components/PackingInput/index.tsx | 7 +- src/state/store.ts | 115 +++++++++++++++----------- 3 files changed, 79 insertions(+), 60 deletions(-) diff --git a/src/components/Dropdown/index.tsx b/src/components/Dropdown/index.tsx index c252220b..d503acf4 100644 --- a/src/components/Dropdown/index.tsx +++ b/src/components/Dropdown/index.tsx @@ -3,22 +3,21 @@ import { Dictionary, PackingInputs } from "../../types"; interface DropdownProps { placeholder: string; + defaultValue?: string; options: Dictionary; onChange: (value: string) => void; } const Dropdown = (props: DropdownProps): JSX.Element => { - const { placeholder, options, onChange } = props; - const selectOptions = Object.entries(options).map(([key]) => ( - { - label: {key}, - value: key, - } - )); + const { placeholder, options, onChange, defaultValue } = props; + const selectOptions = Object.entries(options).map(([key]) => ({ + label: {key}, + value: key, + })); return (