fix the glossary tag breaking in bulk edit and import (#20845)

This commit is contained in:
Ashish Gupta 2025-04-16 07:53:29 +05:30 committed by GitHub
parent f976bc2c36
commit 82ba5cb532
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,7 +15,7 @@ import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
import { Tag as AntdTag, Tooltip, Typography } from 'antd';
import { AxiosError } from 'axios';
import i18next from 'i18next';
import { omit } from 'lodash';
import { isString, omit } from 'lodash';
import { EntityTags } from 'Models';
import type { CustomTagProps } from 'rc-select/lib/BaseSelect';
import React from 'react';
@ -225,7 +225,7 @@ export const getTagPlaceholder = (isGlossaryType: boolean): string =>
export const tagRender = (customTagProps: CustomTagProps) => {
const { label, onClose } = customTagProps;
const tagLabel = getTagDisplay(label as string);
const tagLabel = isString(label) ? getTagDisplay(label) : label;
const onPreventMouseDown = (event: React.MouseEvent<HTMLSpanElement>) => {
event.preventDefault();