From c61675ab1774ba59905a03a51f9f2a52a01200e7 Mon Sep 17 00:00:00 2001 From: Anya Wallace Date: Tue, 19 Nov 2024 15:51:49 -0800 Subject: [PATCH] fix combobox attribute name --- packages/core/components/ComboBox/index.tsx | 4 ++-- .../core/components/EditMetadata/NewAnnotationPathway.tsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/core/components/ComboBox/index.tsx b/packages/core/components/ComboBox/index.tsx index 802f3299..3225fe46 100644 --- a/packages/core/components/ComboBox/index.tsx +++ b/packages/core/components/ComboBox/index.tsx @@ -18,7 +18,7 @@ const FUZZY_SEARCH_OPTIONS = { interface Props { className?: string; - defaultValue?: string; + selectedKey?: string; disabled?: boolean; label: string; multiSelect?: boolean; @@ -70,7 +70,7 @@ export default function BaseComboBox(props: Props) { allowFreeform caretDownButtonStyles={{ root: styles.comboBoxCaret }} className={props?.className} - defaultValue={props?.defaultValue} + selectedKey={props?.selectedKey} disabled={props?.disabled} placeholder={placeholder} label={label} diff --git a/packages/core/components/EditMetadata/NewAnnotationPathway.tsx b/packages/core/components/EditMetadata/NewAnnotationPathway.tsx index 45f3dd16..a5e0b9c5 100644 --- a/packages/core/components/EditMetadata/NewAnnotationPathway.tsx +++ b/packages/core/components/EditMetadata/NewAnnotationPathway.tsx @@ -72,12 +72,12 @@ export default function NewAnnotationPathway(props: NewAnnotationProps) { <> { + options={Object.values(AnnotationType).map((type) => { return { - key: `datatype-${index}`, + key: `datatype-${type}`, text: type, }; })}