mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-16 10:08:08 +00:00
UI : Fix the missing drag icon from Teams Table (#9429)
* Fix the drag icon from Teams Table * added drag option in expandable config * remove unwanted css changes
This commit is contained in:
parent
03edd9df56
commit
4fdf14f2da
@ -134,7 +134,7 @@ const TeamHierarchy: FC<TeamHierarchyProps> = ({
|
|||||||
|
|
||||||
const expandableConfig: ExpandableConfig<Team> = useMemo(
|
const expandableConfig: ExpandableConfig<Team> = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
...getTableExpandableConfig<Team>(),
|
...getTableExpandableConfig<Team>(true),
|
||||||
onExpand: (isOpen, record) => {
|
onExpand: (isOpen, record) => {
|
||||||
if (isOpen && isEmpty(record.children)) {
|
if (isOpen && isEmpty(record.children)) {
|
||||||
onTeamExpand(false, record.fullyQualifiedName, true);
|
onTeamExpand(false, record.fullyQualifiedName, true);
|
||||||
|
|||||||
@ -54,40 +54,9 @@
|
|||||||
td {
|
td {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
background: @white;
|
background: @white;
|
||||||
|
|
||||||
.drag-icon {
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
margin-right: 6px;
|
|
||||||
display: inline-flex;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.expand-icon {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.expand-cell-icon-container {
|
|
||||||
display: inline-flex;
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.expand-cell-empty-icon-container {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
display: inline-flex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-table-cell-with-append {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
.ant-table-cell-row-hover {
|
.ant-table-cell-row-hover {
|
||||||
background: @body-dark-bg-color;
|
background: @body-dark-bg-color;
|
||||||
.drag-icon {
|
|
||||||
visibility: initial;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1017,11 +1017,12 @@ const ServicePage: FunctionComponent = () => {
|
|||||||
isRecursiveDelete
|
isRecursiveDelete
|
||||||
afterDeleteAction={() =>
|
afterDeleteAction={() =>
|
||||||
history.push(
|
history.push(
|
||||||
`/settings/services/${
|
getSettingPath(
|
||||||
|
GlobalSettingsMenuCategory.SERVICES,
|
||||||
SERVICE_CATEGORY_TYPE[
|
SERVICE_CATEGORY_TYPE[
|
||||||
serviceCategory as keyof typeof SERVICE_CATEGORY_TYPE
|
serviceCategory as keyof typeof SERVICE_CATEGORY_TYPE
|
||||||
]
|
]
|
||||||
}`
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
allowSoftDelete={false}
|
allowSoftDelete={false}
|
||||||
|
|||||||
@ -9,6 +9,35 @@
|
|||||||
.ant-table-bordered {
|
.ant-table-bordered {
|
||||||
table {
|
table {
|
||||||
border: 1px solid #dde3ea;
|
border: 1px solid #dde3ea;
|
||||||
|
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
|
td {
|
||||||
|
.drag-icon {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
margin-right: 2px;
|
||||||
|
display: inline-flex;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expand-icon {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expand-cell-empty-icon-container {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ant-table-cell-row-hover {
|
||||||
|
.drag-icon {
|
||||||
|
visibility: initial;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.ant-table-container > .ant-table-content > table > tbody > tr > td {
|
.ant-table-container > .ant-table-content > table > tbody > tr > td {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import { upperCase } from 'lodash';
|
|||||||
import { EntityTags } from 'Models';
|
import { EntityTags } from 'Models';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ReactComponent as DashboardIcon } from '../assets/svg/dashboard-grey.svg';
|
import { ReactComponent as DashboardIcon } from '../assets/svg/dashboard-grey.svg';
|
||||||
|
import { ReactComponent as DragIcon } from '../assets/svg/drag.svg';
|
||||||
import { ReactComponent as DropDownIcon } from '../assets/svg/DropDown.svg';
|
import { ReactComponent as DropDownIcon } from '../assets/svg/DropDown.svg';
|
||||||
import { ReactComponent as RightArrowIcon } from '../assets/svg/ic-right-arrow.svg';
|
import { ReactComponent as RightArrowIcon } from '../assets/svg/ic-right-arrow.svg';
|
||||||
import { ReactComponent as MlModelIcon } from '../assets/svg/mlmodal.svg';
|
import { ReactComponent as MlModelIcon } from '../assets/svg/mlmodal.svg';
|
||||||
@ -369,17 +370,29 @@ export const getTestResultBadgeIcon = (status?: TestCaseStatus) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export function getTableExpandableConfig<T>(): ExpandableConfig<T> {
|
export function getTableExpandableConfig<T>(
|
||||||
|
isDraggable?: boolean
|
||||||
|
): ExpandableConfig<T> {
|
||||||
const expandableConfig: ExpandableConfig<T> = {
|
const expandableConfig: ExpandableConfig<T> = {
|
||||||
expandIcon: ({ expanded, onExpand, expandable, record }) =>
|
expandIcon: ({ expanded, onExpand, expandable, record }) =>
|
||||||
expandable && (
|
expandable ? (
|
||||||
<Icon
|
<>
|
||||||
className="mr-1"
|
{isDraggable && <Icon className="drag-icon" component={DragIcon} />}
|
||||||
component={expanded ? DropDownIcon : RightArrowIcon}
|
<Icon
|
||||||
data-testid="expand-icon"
|
className="mr-1"
|
||||||
size={16}
|
component={expanded ? DropDownIcon : RightArrowIcon}
|
||||||
onClick={(e) => onExpand(record, e)}
|
data-testid="expand-icon"
|
||||||
/>
|
size={16}
|
||||||
|
onClick={(e) => onExpand(record, e)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
isDraggable && (
|
||||||
|
<>
|
||||||
|
<Icon className="drag-icon" component={DragIcon} />
|
||||||
|
<div className="expand-cell-empty-icon-container" />
|
||||||
|
</>
|
||||||
|
)
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user