mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-09 15:32:25 +00:00
parent
b781c66206
commit
079f78c558
@ -109,12 +109,15 @@ const GlossaryTermsV1 = ({
|
|||||||
tab !== 'assets' && activeTabHandler('assets');
|
tab !== 'assets' && activeTabHandler('assets');
|
||||||
}, [assetTabRef, tab]);
|
}, [assetTabRef, tab]);
|
||||||
|
|
||||||
const onExtensionUpdate = async (updatedTable: GlossaryTerm) => {
|
const onExtensionUpdate = useCallback(
|
||||||
|
async (updatedTable: GlossaryTerm) => {
|
||||||
await handleGlossaryTermUpdate({
|
await handleGlossaryTermUpdate({
|
||||||
...glossaryTerm,
|
...glossaryTerm,
|
||||||
extension: updatedTable.extension,
|
extension: updatedTable.extension,
|
||||||
});
|
});
|
||||||
};
|
},
|
||||||
|
[glossaryTerm, handleGlossaryTermUpdate]
|
||||||
|
);
|
||||||
|
|
||||||
const tabItems = useMemo(() => {
|
const tabItems = useMemo(() => {
|
||||||
const items = [
|
const items = [
|
||||||
@ -241,6 +244,7 @@ const GlossaryTermsV1 = ({
|
|||||||
isVersionView,
|
isVersionView,
|
||||||
assetPermissions,
|
assetPermissions,
|
||||||
handleAssetSave,
|
handleAssetSave,
|
||||||
|
onExtensionUpdate,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const fetchGlossaryTermAssets = async () => {
|
const fetchGlossaryTermAssets = async () => {
|
||||||
|
|||||||
@ -34,6 +34,7 @@ import {
|
|||||||
getDiffByFieldName,
|
getDiffByFieldName,
|
||||||
getUpdatedExtensionDiffFields,
|
getUpdatedExtensionDiffFields,
|
||||||
} from '../../../utils/EntityVersionUtils';
|
} from '../../../utils/EntityVersionUtils';
|
||||||
|
import { getDecodedFqn } from '../../../utils/StringsUtils';
|
||||||
import { showErrorToast } from '../../../utils/ToastUtils';
|
import { showErrorToast } from '../../../utils/ToastUtils';
|
||||||
import { usePermissionProvider } from '../../PermissionProvider/PermissionProvider';
|
import { usePermissionProvider } from '../../PermissionProvider/PermissionProvider';
|
||||||
import {
|
import {
|
||||||
@ -67,11 +68,12 @@ export const CustomPropertyTable = <T extends ExtentionEntitiesKeys>({
|
|||||||
const [entityTypeDetailLoading, setEntityTypeDetailLoading] =
|
const [entityTypeDetailLoading, setEntityTypeDetailLoading] =
|
||||||
useState<boolean>(false);
|
useState<boolean>(false);
|
||||||
const { fqn } = useParams<{ fqn: string; tab: string; version: string }>();
|
const { fqn } = useParams<{ fqn: string; tab: string; version: string }>();
|
||||||
|
const decodedeFqn = getDecodedFqn(fqn);
|
||||||
|
|
||||||
const fetchExtentiondetails = async () => {
|
const fetchExtentiondetails = async () => {
|
||||||
const response = await getEntityExtentionDetailsFromEntityType<T>(
|
const response = await getEntityExtentionDetailsFromEntityType<T>(
|
||||||
entityType,
|
entityType,
|
||||||
fqn
|
decodedeFqn
|
||||||
);
|
);
|
||||||
|
|
||||||
setExtentionDetails(response as ExtentionEntities[T]);
|
setExtentionDetails(response as ExtentionEntities[T]);
|
||||||
@ -79,7 +81,7 @@ export const CustomPropertyTable = <T extends ExtentionEntitiesKeys>({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchExtentiondetails();
|
fetchExtentiondetails();
|
||||||
}, [fqn]);
|
}, [decodedeFqn]);
|
||||||
|
|
||||||
const [typePermission, setPermission] = useState<OperationPermission>();
|
const [typePermission, setPermission] = useState<OperationPermission>();
|
||||||
const versionDetails = entityDetails ?? extentionDetails;
|
const versionDetails = entityDetails ?? extentionDetails;
|
||||||
@ -128,7 +130,7 @@ export const CustomPropertyTable = <T extends ExtentionEntitiesKeys>({
|
|||||||
setExtentionDetails(updatedData);
|
setExtentionDetails(updatedData);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[versionDetails]
|
[versionDetails, handleExtensionUpdate]
|
||||||
);
|
);
|
||||||
|
|
||||||
const extensionObject: {
|
const extensionObject: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user