Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/components/shared/wizard/RenderField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,15 @@ const EditableSingleSelect = (props: EditableSingleSelectProps) => {
metadataField={metadataField}
text={text}
form={form}
options={
metadataField.collection
? metadataField.collection.map(item => ({
label: item.label ?? item.name,
value: item.value,
order: item.order,
}))
: []
}
Comment on lines +232 to +240
Copy link
Copy Markdown
Contributor

@owi92 owi92 Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also do

Suggested change
options={
metadataField.collection
? metadataField.collection.map(item => ({
label: item.label ?? item.name,
value: item.value,
order: item.order,
}))
: []
}
options={metadataField.collection?.map(option => ({
...option,
label: option.label ?? option.name,
}))}

but it's functionally equivalent, so not super necessary to change.

isFirstField={isFirstField}
focused={focused}
setFocused={setFocused}
Expand Down