fix: Glossary tags are not showing proper name when using in entities #13440 (#13448)

This commit is contained in:
Shailesh Parmar 2023-10-05 18:35:01 +05:30 committed by GitHub
parent 44df02010a
commit de2b2c6428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -13,7 +13,7 @@
import { Select, SelectProps, Space, Tooltip, Typography } from 'antd'; import { Select, SelectProps, Space, Tooltip, Typography } from 'antd';
import { DefaultOptionType } from 'antd/lib/select'; import { DefaultOptionType } from 'antd/lib/select';
import { AxiosError } from 'axios'; import { AxiosError } from 'axios';
import { debounce } from 'lodash'; import { debounce, isEmpty } from 'lodash';
import React, { FC, useCallback, useMemo, useState } from 'react'; import React, { FC, useCallback, useMemo, useState } from 'react';
import Loader from '../../components/Loader/Loader'; import Loader from '../../components/Loader/Loader';
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants'; import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
@ -70,8 +70,9 @@ const AsyncSelectList: FC<AsyncSelectListProps> = ({
.map((tag) => { .map((tag) => {
const displayName = tag.data?.displayName; const displayName = tag.data?.displayName;
const parts = Fqn.split(tag.label); const parts = Fqn.split(tag.label);
const lastPartOfTag = const lastPartOfTag = isEmpty(displayName)
displayName ?? parts.slice(-1).join(FQN_SEPARATOR_CHAR); ? parts.slice(-1).join(FQN_SEPARATOR_CHAR)
: displayName;
parts.pop(); parts.pop();
return { return {

View File

@ -97,7 +97,7 @@ const TagsV1 = ({
const tagColorBar = useMemo( const tagColorBar = useMemo(
() => () =>
color ? ( color ? (
<div className="tag-color-bar" style={{ background: color }} /> <div className="tag-color-bar" style={{ borderColor: color }} />
) : null, ) : null,
[color] [color]
); );

View File

@ -44,9 +44,7 @@
} }
.tag-color-bar { .tag-color-bar {
width: 5px; border-left: 5px solid @tag-background-color;
height: auto;
background: @tag-background-color;
} }
.tags-label { .tags-label {