diff --git a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/CellFormatter.tsx b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/CellFormatter.tsx index 774ad86797..5a62873aa6 100644 --- a/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/CellFormatter.tsx +++ b/webapp/packages/plugin-object-viewer/src/ObjectPropertiesPage/ObjectPropertyTable/Table/CellFormatter.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react-lite'; import { useContext, useState } from 'react'; -import { getComputed, Icon, s, useMouse, useS, useStateDelay } from '@cloudbeaver/core-blocks'; +import { getComputed, Icon, s, useMouse, useMouseContextMenu, useS, useStateDelay } from '@cloudbeaver/core-blocks'; import { ConnectionInfoResource, DATA_CONTEXT_CONNECTION } from '@cloudbeaver/core-connections'; import { useDataContextLink } from '@cloudbeaver/core-data-context'; import { useService } from '@cloudbeaver/core-di'; @@ -35,6 +35,7 @@ export const Menu = observer(function Menu({ value, node }) { const mouse = useMouse(); const [menuOpened, switchState] = useState(false); const connection = connectionsInfoResource.getConnectionForNode(node.id); + const mouseContextMenu = useMouseContextMenu(); useDataContextLink(menu.context, (context, id) => { context.set(DATA_CONTEXT_NAV_NODE, node, id); @@ -60,21 +61,25 @@ export const Menu = observer(function Menu({ value, node }) { return !menu.available; }); + function contextMenuOpenHandler(event: React.MouseEvent) { + mouseContextMenu.handleContextMenuOpen(event); + } + + function valueFieldClickHandler(event: React.MouseEvent) { + event.preventDefault(); + } + return ( -
-
-
- {value} + +
+
+
+ {value} +
+ {!menuEmpty && }
- {!menuEmpty && ( - -
- -
-
- )}
-
+ ); });