fix: improve UX of dropdown (#1905)
Removed the logic of onMouseLeave. The logic of clicking to open and clicking to close is clearer. Fixes: #1898
This commit is contained in:
@@ -58,15 +58,7 @@ export const OperationButton = ({
|
|||||||
setPinboardMenuOpen(false);
|
setPinboardMenuOpen(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div>
|
||||||
onClick={e => {
|
|
||||||
e.stopPropagation();
|
|
||||||
}}
|
|
||||||
onMouseLeave={() => {
|
|
||||||
setOperationMenuOpen(false);
|
|
||||||
setPinboardMenuOpen(false);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<StyledOperationButton
|
<StyledOperationButton
|
||||||
data-testid="pinboard-operation-button"
|
data-testid="pinboard-operation-button"
|
||||||
ref={ref => setAnchorEl(ref)}
|
ref={ref => setAnchorEl(ref)}
|
||||||
|
|||||||
Reference in New Issue
Block a user