I use Atlaskit to develop a jira plugin. But the onChange function does not work as planned. Can someone help me? Below is the part of example code.
const AdminPage = () => {
function closeDialog() {
}
function submit(data) {
return undefined;
}
return (
<div>
<ModalTransition>
<ModalDialog onClose={closeDialog}>
<Form onSubmit={(data) => submit(data)}>
{({formProps}) => (
<form id='form-id' {...formProps}>
<ModalBody>
<Field name="select-field-test" label="Select Field Test">
{({fieldProps: {id, ...rest}}) => (
<Fragment>
<Select
className="single-select"
classNamePrefix="react-select"
placeholder="Please select a value"
onChange={() => console.log("val" )}
options={[
{ label: "A", value: "a" },
{ label: "B", value: "b" },
{ label: "C", value: "c" }
]}
{...rest}
/>
</Fragment>
)}
</Field>
</ModalBody>
</form>
)}
</Form>
</ModalDialog>
)}
</ModalTransition>
</div>
);
}
export default AdminPage;