diff --git a/datahub-web-react/src/app/govern/structuredProperties/StructuredPropsTable.tsx b/datahub-web-react/src/app/govern/structuredProperties/StructuredPropsTable.tsx
index 6689a1460f2..a180821c2ee 100644
--- a/datahub-web-react/src/app/govern/structuredProperties/StructuredPropsTable.tsx
+++ b/datahub-web-react/src/app/govern/structuredProperties/StructuredPropsTable.tsx
@@ -1,6 +1,5 @@
import { useApolloClient } from '@apollo/client';
-import { Icon, Pill, Table, Text, Tooltip } from '@components';
-import { Dropdown } from 'antd';
+import { Icon, Menu, Pill, Table, Text, Tooltip } from '@components';
import React, { useState } from 'react';
import Highlight from 'react-highlighter';
@@ -10,7 +9,6 @@ import {
CardIcons,
DataContainer,
IconContainer,
- MenuItem,
NameColumn,
PillContainer,
PillsContainer,
@@ -245,95 +243,68 @@ const StructuredPropsTable = ({
render: (record) => {
const items = [
{
+ type: 'item' as const,
key: '0',
- label: (
-
- ),
+ title: 'View',
+ onClick: () => {
+ setIsViewDrawerOpen(true);
+ setSelectedProperty(record);
+ analytics.event({
+ type: EventType.ViewStructuredPropertyEvent,
+ propertyUrn: record.entity.urn,
+ });
+ },
},
{
+ type: 'item' as const,
key: '1',
- label: (
-
- ),
+ title: 'Copy Urn',
+ onClick: () => {
+ navigator.clipboard.writeText(record.entity.urn);
+ },
},
{
+ type: 'item' as const,
key: '2',
+ title: 'Edit',
disabled: !canEditProps,
- label: (
-
-
-
- ),
+ tooltip: !canEditProps
+ ? 'Must have permission to manage structured properties. Ask your DataHub administrator.'
+ : undefined,
+ onClick: () => {
+ if (canEditProps) {
+ setIsDrawerOpen(true);
+ setSelectedProperty(record);
+ analytics.event({
+ type: EventType.ViewStructuredPropertyEvent,
+ propertyUrn: record.entity.urn,
+ });
+ }
+ },
},
{
+ type: 'item' as const,
key: '3',
+ title: 'Delete',
disabled: !canEditProps,
- label: (
-
-
-
- ),
+ danger: true,
+ tooltip: !canEditProps
+ ? 'Must have permission to manage structured properties. Ask your DataHub administrator.'
+ : undefined,
+ onClick: () => {
+ if (canEditProps) {
+ setSelectedProperty(record);
+ setShowConfirmDelete(true);
+ }
+ },
},
];
return (
<>
-
+
+
>
);