Hi,
I’ve been trying to use the DropdownMenu from React Atlaskit (following the documentation: https://atlassian.design/components/dropdown-menu/examples#appearance). For some reason, the menu keeps rendering on the top left of my screen rather than underneath trigger. Strangely, whenever I set defaultOpen to true, the positioning is fixed, but obviously that’s not an ideal solution. Im using “@atlaskit/dropdown-menu”: “^12.11.1”. Heres the code:
import DropdownMenu, { DropdownItem, DropdownItemGroup } from "@atlaskit/dropdown-menu";
export default function NavbarProfileDropdown() {
return (
<DropdownMenu trigger="Page Actions" shouldRenderToParent>
<DropdownItemGroup>
<DropdownItem>Sign in</DropdownItem>
<DropdownItem>Logout</DropdownItem>
</DropdownItemGroup>
</DropdownMenu>
);
}
EDIT: Turning off strict mode fixed it