@atlaskit/dropdown-menu: DropdownItem is any and onClick is not working

Hey guys,

I hope I am right here with my question / issue… I have a react application written in typescript where I want to use Dropdown component. I encountered two problems here:

  1. The DropdownItem component is of type any
  2. It seems that the onClick-event is not working. I try to register an event handler on it but this gets never called. I created a codesandbox where you can take a look on: CodeSanbox

Can you help me here? Many thanks in advance,
Nick

1 Like

It’s broken in fact. I was using onMouseDown as a workaround, but this is not perfect from user point of view.

1 Like

Thanks! As a workaround this is helpful. But you are right, this is not perfect…

It seems that this is related to the used styled-components version. In the official code sandboxes from the documentation an old version of styled-components (3.2.6) is used. There it works… But unfortunately not with the latest ones (e.g. 5.2.1)

it is bloody annoying.

no guide line or error for it .

they should fix it

It is already a document about these peer dependencies here: Atlaskit by Atlassian