0xProject / 0x-launch-kit-frontend

Apache License 2.0
112 stars 207 forks source link

(Feature) Close dropdown on click outside #500

Closed Agupane closed 5 years ago

Agupane commented 5 years ago

Closes #497

Description

Before this PR, the user needed to press the dropdown in the toolbar to close it, now the dropdown should close everytime the user clicks outside the dropdown (but only if the wETH converter is NOT open)

Also I'd made a little refactor of the WalletConnectionStatusContainer (see first commit). Now that component does not have status and is not responsible for set the headerText, it should be defined from the different WalletConnectionContent (ERC20 and ERC721)

fvictorio commented 5 years ago

This breaks the search in the market dropdown: when you click the input to type something, the dropdown is closed.

I don't think the document.addEventListender('mousedown', ... is the correct approach here. I think the usual way of doing this is with an overlay. There surely are other approaches, though.

Agupane commented 5 years ago

It's fixed now @fvictorio