Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#11623] web-v2(UI):Hide catalog properties not present in API response during edit mode (#11675)

Qian Xia8c14068cec20
diff --git a/web-v2/web/src/app/catalogs/rightContent/CreateCatalogDialog.js b/web-v2/web/src/app/catalogs/rightContent/CreateCatalogDialog.js
index e50a93ae01..92dfeb5dfe 100644
--- a/web-v2/web/src/app/catalogs/rightContent/CreateCatalogDialog.js
+++ b/web-v2/web/src/app/catalogs/rightContent/CreateCatalogDialog.js
@@ -115,6 +115,11 @@ export default function CreateCatalogDialog({ ...props }) {
const isHidden = prop => {
const { parentField, hide, key } = prop
+
+ // In edit mode, hide props not present in the loaded catalog response
+ if (editCatalog && cacheData?.properties && !(key in cacheData.properties)) {
+ return true
+ }
switch (parentField) {
case 'catalog-backend':
return catalogBackend && hide && hide.includes(catalogBackend)