When adding a RadioGroup to a Confluence macro config pane, the RadioGroup is not selectable.
This minimal sample from documentation results in a non-functional RadioGroup.
import React, { useEffect, useState } from 'react';
import ForgeReconciler, { Text, RadioGroup, useConfig } from '@forge/react';
const defaultConfig = {color: 'purple'};
const options = [
{ name: 'color', value: 'red', label: 'Red' },
{ name: 'color', value: 'blue', label: 'Blue' },
{ name: 'color', value: 'yellow', label: 'Yellow' },
{ name: 'color', value: 'green', label: 'Green' },
{ name: 'color', value: 'black', label: 'Black' },
];
const Config = () => {
return (
<>
<RadioGroup options={options} value="red"/>
</>
);
};
const App = () => {
const config = useConfig() || defaultConfig;
return (
<>
<Text>Color: {config.color}</Text>
</>
);
};
ForgeReconciler.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
ForgeReconciler.addConfig(<Config />);
Upon adding the macro to a Confluence page it shows āpurpleā as expected.
When the macro config pane is opened the RadioGroup is āhalf selectableā for lack of a better term. When you select an option, an outline will appear around the selection circle, but the item isnāt actually selected, and what appears to be stored in the config is either the empty string or a null value as the color value disappears from Text component.
The null color persists from then on.
This seems pretty basic. What am I missing? Does anyone have a RadioGroup working in a macro config pane?