|
@@ -1,5 +1,5 @@
|
|
|
import React, { useState, useEffect, useRef } from 'react';
|
|
|
-import { Space, Dropdown, Menu } from 'antd';
|
|
|
+import { Space, Menu, Popover } from 'antd';
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
import { useSelector } from 'react-redux';
|
|
|
import {
|
|
@@ -167,7 +167,10 @@ const BusinessZone: React.FC<BusinessZoneProps> = ({ onMenuClick }) => {
|
|
|
<MeButton
|
|
|
key={child.key}
|
|
|
data-testid={child.key}
|
|
|
- onClick={() => onMenuClick?.(child.key)}
|
|
|
+ onClick={() => {
|
|
|
+ setFloatingMenuVisible(false);
|
|
|
+ onMenuClick?.(child.key);
|
|
|
+ }}
|
|
|
username={child.label}
|
|
|
/>
|
|
|
))}
|
|
@@ -200,10 +203,12 @@ const BusinessZone: React.FC<BusinessZoneProps> = ({ onMenuClick }) => {
|
|
|
}
|
|
|
>
|
|
|
{item.key === 'patient_management' ? (
|
|
|
- <Dropdown
|
|
|
- overlay={menu}
|
|
|
- trigger={['click']}
|
|
|
- placement="topRight"
|
|
|
+ <Popover
|
|
|
+ open={floatingMenuVisible}
|
|
|
+ placement="rightTop"
|
|
|
+ content={menu}
|
|
|
+ trigger="click"
|
|
|
+ arrow={false}
|
|
|
>
|
|
|
<MeButton
|
|
|
icon={item.icon}
|
|
@@ -211,7 +216,7 @@ const BusinessZone: React.FC<BusinessZoneProps> = ({ onMenuClick }) => {
|
|
|
onClick={handlePatientManagementClick}
|
|
|
username={item.label}
|
|
|
/>
|
|
|
- </Dropdown>
|
|
|
+ </Popover>
|
|
|
) : (
|
|
|
<MeButton
|
|
|
icon={item.icon}
|