fix Enums becoming blank when there's a type annotation

This commit is contained in:
Victor Oliva
2024-10-23 09:55:54 +02:00
parent 8439f16902
commit 71f57cdd0d
2 changed files with 6 additions and 2 deletions
+1
View File
@@ -33,6 +33,7 @@ export const SearchableSelect = <T,>({
value={value}
onChange={(value) => setValue(value)}
onClose={() => setQuery("")}
immediate
>
<div className="flex flex-row p-2 rounded border border-polkadot-200 text-white bg-black">
<ComboboxInput
+5 -2
View File
@@ -47,8 +47,11 @@ export const CEnum: EditEnum = ({
onValueChanged({ type: selected, value })
}
}}
value={value === NOTIN ? "" : value.type + getOptionType(value.type)}
options={options.map((option) => ({ text: option, value: option }))}
value={value === NOTIN ? "" : value.type}
options={options.map((option) => ({
text: option + getOptionType(option),
value: option,
}))}
/>
{!isComplexShape && inner}
</div>