I am using @atlaskit/dropdown-menu
(https://atlaskit.atlassian.com/packages/core/dropdown-menu). I would like to submit a small form on Item
click, I need to submit values of DropdownItemCheckbox
.
Here is a code to render needed components: https://codesandbox.io/s/py8qoo64mq
import React from "react";
import Dropdown, {
DropdownItemCheckbox,
DropdownItemGroupCheckbox,
DropdownItem
} from "@atlaskit/dropdown-menu";
export default () => (
<Dropdown defaultOpen triggerType="button" trigger="Drop menu">
<DropdownItemGroupCheckbox id="languages2" title="Languages">
<DropdownItemCheckbox defaultSelected id="js-check">
JavaScript
</DropdownItemCheckbox>
<DropdownItemCheckbox id="java">Java</DropdownItemCheckbox>
<DropdownItemCheckbox defaultSelected id="ruby">
Ruby
</DropdownItemCheckbox>
</DropdownItemGroupCheckbox>
<DropdownItem>Submit</DropdownItem>
</Dropdown>
);
I don't want to use Select
because I want to trigger dropdown list with a custom button, and use layering advantages of DropdownMenu
I had the same issue, and after a lot of research i found that the problem was caused by styled-components package, but it works with if the version is <=3.5.0-0. So my solution was to downgrade styled-components package to 3.5.0-0. This does not explain why it doesn't work because they are just styles. But for now this is a workaround.
After i raised an issue, Atlassian sent me the following response that i think will answer your questions.