I created a Jira gadget based on the Custom UI and added a Form with a Select and a Save button at the bottom. The Select has 4 options, but the dropdown is not displayed completely.
See also screenshot. I added the gadget twice to my dashboard and in the right panel I clicked on the function dropdown to open it. Only the top part of the first option is displayed.
Basically, the code I have is like
import React, { Fragment, useEffect, useState } from 'react';
import Form, { Field , ErrorMessage} from '@atlaskit/form';
import TextField from '@atlaskit/textfield';
import Select from '@atlaskit/select';
import Button, { ButtonGroup } from '@atlaskit/button';
import { view } from '@forge/bridge';
const FUNCTIONS = [{"label" : "Sum", value:"sum"},
{"label" : "Average", value:"avg"},
{"label" : "Minimum", value:"min"},
{"label" : "Maximum", value:"max"}];
function Edit({context}) {
const [configuration, setConfiguration] = useState();
const onSubmit = (formData) => {
view.submit(formData);
}
useEffect(() => {
setConfiguration(context.extension.gadgetConfiguration);
}, []);
if (!configuration ) {
return 'Loading...';
}
return (
<Form onSubmit={onSubmit}>
{({ formProps, submitting }) => (
<form {...formProps}>
<Field name="fn" label="Function">
{({ fieldProps: { ...rest }, error }) =>
<Fragment>
<Select
defaultValue={
configuration.fn ?
{ label: configuration.fn.label,
value: configuration.fn.value }
: ""}
options={FUNCTIONS}
{...rest}/>
</Fragment>
}
</Field>
<ButtonGroup>
<Button type="submit" isDisabled={submitting}>Save</Button>
<Button appearance="subtle" onClick={view.close}>Cancel</Button>
</ButtonGroup>
</form>
)}
</Form>
);
}
export default Edit;
The dependencies are defined in the package.json like this
"dependencies": {
"@atlaskit/button": "^17.14.2",
"@atlaskit/css-reset": "^6.9.0",
"@atlaskit/form": "^10.0.0",
"@atlaskit/select": "^17.9.0",
"@atlaskit/textfield": "^6.3.1",
"@atlaskit/tooltip": "^18.4.0",
"@forge/bridge": "^3.4.0",
"react": "^16.14.0",
"react-dom": "^16.14.0"
}
How can I force to display the dropdown completely? Thanks in advance.