As mentioned in Title I’m having trouble with UI Kit Select on Customfield Type Edit resource.
So first problem is that I have label in variable ( even with constant string ) there is no label displayed.
Second problem is that I can’t pre-select the value, that’s already saved in the customfield.
I also tried adding defaultSelected
only to the one, that I want to select… didn’t help
And the last one, there are no styles. It has default html select appearance.
code:
const [label, _] = useState("Select Value:");
…
<FormSection>
{error && <SectionMessage appearance="error">{error}</SectionMessage>}
<Select name="selectedOption" label={label}>
{rawOptions.map(rawOption => {
const props = {
label: rawOption.text,
value: !rawOption.id ? "" : JSON.stringify(rawOption),
defaultSelected: rawOption.id === extensionData?.fieldValue?.id
}
return (
<Option {...props} />
)
})}
</Select>
</FormSection>
on Create Issue it is the same no-styled default html select.