mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-16 10:08:08 +00:00
minor: improve types in ModalWithCustomPropertyEditor component (#18395)
* minor: improve types in ModalWithCustomPropertyEditor component * fix: formatting
This commit is contained in:
parent
c8e2ed0653
commit
78f19d4f84
@ -768,7 +768,6 @@ export const AuthProvider = ({
|
|||||||
handleFailedLogin,
|
handleFailedLogin,
|
||||||
updateAxiosInterceptors: initializeAxiosInterceptors,
|
updateAxiosInterceptors: initializeAxiosInterceptors,
|
||||||
});
|
});
|
||||||
|
|
||||||
}, [handleSuccessfulLogin]);
|
}, [handleSuccessfulLogin]);
|
||||||
|
|
||||||
const isConfigLoading =
|
const isConfigLoading =
|
||||||
|
|||||||
@ -15,8 +15,6 @@ import React, { useEffect, useState } from 'react';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { EntityType } from '../../../enums/entity.enum';
|
|
||||||
import { GlossaryTerm } from '../../../generated/entity/data/glossaryTerm';
|
|
||||||
import { Type } from '../../../generated/entity/type';
|
import { Type } from '../../../generated/entity/type';
|
||||||
import { getTypeByFQN } from '../../../rest/metadataTypeAPI';
|
import { getTypeByFQN } from '../../../rest/metadataTypeAPI';
|
||||||
import {
|
import {
|
||||||
@ -25,6 +23,7 @@ import {
|
|||||||
} from '../../../utils/CSV/CSV.utils';
|
} from '../../../utils/CSV/CSV.utils';
|
||||||
import { showErrorToast } from '../../../utils/ToastUtils';
|
import { showErrorToast } from '../../../utils/ToastUtils';
|
||||||
import { CustomPropertyTable } from '../../common/CustomPropertyTable/CustomPropertyTable';
|
import { CustomPropertyTable } from '../../common/CustomPropertyTable/CustomPropertyTable';
|
||||||
|
import { ExtentionEntities } from '../../common/CustomPropertyTable/CustomPropertyTable.interface';
|
||||||
import Loader from '../../common/Loader/Loader';
|
import Loader from '../../common/Loader/Loader';
|
||||||
import {
|
import {
|
||||||
ExtensionDataProps,
|
ExtensionDataProps,
|
||||||
@ -75,7 +74,9 @@ export const ModalWithCustomPropertyEditor = ({
|
|||||||
setIsSaveLoading(false);
|
setIsSaveLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onExtensionUpdate = async (data: GlossaryTerm) => {
|
const onExtensionUpdate = async (
|
||||||
|
data: ExtentionEntities[keyof ExtentionEntities]
|
||||||
|
) => {
|
||||||
setExtensionObject(data.extension);
|
setExtensionObject(data.extension);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -120,8 +121,12 @@ export const ModalWithCustomPropertyEditor = ({
|
|||||||
hasEditAccess
|
hasEditAccess
|
||||||
hasPermission
|
hasPermission
|
||||||
isRenderedInRightPanel
|
isRenderedInRightPanel
|
||||||
entityDetails={{ extension: extensionObject } as GlossaryTerm}
|
entityDetails={
|
||||||
entityType={EntityType.GLOSSARY_TERM}
|
{
|
||||||
|
extension: extensionObject,
|
||||||
|
} as ExtentionEntities[keyof ExtentionEntities]
|
||||||
|
}
|
||||||
|
entityType={entityType as keyof ExtentionEntities}
|
||||||
handleExtensionUpdate={onExtensionUpdate}
|
handleExtensionUpdate={onExtensionUpdate}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -16,7 +16,6 @@ import tagClassBase, { TagClassBase } from './TagClassBase';
|
|||||||
|
|
||||||
jest.mock('../rest/searchAPI');
|
jest.mock('../rest/searchAPI');
|
||||||
|
|
||||||
|
|
||||||
jest.mock('./StringsUtils', () => ({
|
jest.mock('./StringsUtils', () => ({
|
||||||
getEncodedFqn: jest.fn().mockReturnValue('test'),
|
getEncodedFqn: jest.fn().mockReturnValue('test'),
|
||||||
escapeESReservedCharacters: jest.fn().mockReturnValue('test'),
|
escapeESReservedCharacters: jest.fn().mockReturnValue('test'),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user