mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-06 14:26:28 +00:00
Fix glossary tab and chart icon issue for persona (#22793)
(cherry picked from commit 51b826b06ba27734fe81c9d0ca4a16fc7faefd92)
This commit is contained in:
parent
e95aa048c4
commit
c39d949ccd
@ -83,7 +83,7 @@ const GlossaryTermsV1 = ({
|
||||
isTabExpanded,
|
||||
toggleTabExpanded,
|
||||
}: GlossaryTermsV1Props) => {
|
||||
const { tab, version } = useRequiredParams<{
|
||||
const { tab: activeTab, version } = useRequiredParams<{
|
||||
tab: EntityTabs;
|
||||
version: string;
|
||||
}>();
|
||||
@ -109,10 +109,6 @@ const GlossaryTermsV1 = ({
|
||||
: MOCK_GLOSSARY_NO_PERMISSIONS;
|
||||
}, [glossaryTerm, permissions]);
|
||||
|
||||
const activeTab = useMemo(() => {
|
||||
return tab ?? EntityTabs.OVERVIEW;
|
||||
}, [tab]);
|
||||
|
||||
const activeTabHandler = (tab: string) => {
|
||||
navigate(
|
||||
{
|
||||
@ -162,8 +158,8 @@ const GlossaryTermsV1 = ({
|
||||
const handleAssetSave = useCallback(() => {
|
||||
fetchGlossaryTermAssets();
|
||||
assetTabRef.current?.refreshAssets();
|
||||
tab !== 'assets' && activeTabHandler('assets');
|
||||
}, [assetTabRef, tab]);
|
||||
activeTab !== 'assets' && activeTabHandler('assets');
|
||||
}, [assetTabRef, activeTab]);
|
||||
|
||||
const onExtensionUpdate = useCallback(
|
||||
async (updatedTable: GlossaryTerm) => {
|
||||
|
@ -13,6 +13,7 @@
|
||||
import { camelCase, map, startCase } from 'lodash';
|
||||
import { ReactComponent as APICollectionIcon } from '../../assets/svg/api-collection-colored.svg';
|
||||
import { ReactComponent as APIEndpointIcon } from '../../assets/svg/api-endpoints-colored.svg';
|
||||
import { ReactComponent as ChartIcon } from '../../assets/svg/chart-colored.svg';
|
||||
import { ReactComponent as DashboardIcon } from '../../assets/svg/dashboard-colored-new.svg';
|
||||
import { ReactComponent as DashboardDataModelIcon } from '../../assets/svg/dashboard-data-models-colored.svg';
|
||||
import { ReactComponent as DataAssetsIcon } from '../../assets/svg/data-assets-colored-new.svg';
|
||||
@ -37,6 +38,7 @@ import i18n from '../i18next/LocalUtil';
|
||||
|
||||
const ENTITY_ICONS: Record<string, SvgComponent> = {
|
||||
[PageType.Table]: TableIcon,
|
||||
[PageType.Chart]: ChartIcon,
|
||||
[PageType.Container]: StorageIcon,
|
||||
[PageType.Dashboard]: DashboardIcon,
|
||||
[PageType.DashboardDataModel]: DashboardDataModelIcon,
|
||||
|
Loading…
x
Reference in New Issue
Block a user