+ )}
);
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyDataWidget/MyDataWidget.less b/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyDataWidget/MyDataWidget.less
new file mode 100644
index 00000000000..2d62db61be2
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyDataWidget/MyDataWidget.less
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2023 Collate.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.my-data-widget-container {
+ .ant-card-body {
+ display: flex;
+ flex-direction: column;
+ }
+}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/AnnouncementsWidget.less b/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/AnnouncementsWidget.less
index b62d6c978d9..f348b6121ab 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/AnnouncementsWidget.less
+++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/AnnouncementsWidget.less
@@ -13,6 +13,8 @@
.announcement-container {
.ant-card-body {
height: 100%;
+ display: flex;
+ flex-direction: column;
}
.announcement-container-list {
overflow-y: auto;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/AnnouncementsWidget.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/AnnouncementsWidget.tsx
index f02cfcfc785..fed7cd5cf38 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/AnnouncementsWidget.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/AnnouncementsWidget.tsx
@@ -13,7 +13,7 @@
import { CloseOutlined, DragOutlined } from '@ant-design/icons';
import { Alert, Card, Col, Row, Space, Typography } from 'antd';
import { isEmpty, isUndefined } from 'lodash';
-import React, { useCallback } from 'react';
+import React, { useCallback, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { ReactComponent as AnnouncementIcon } from '../../../assets/svg/announcements-v1.svg';
import { Thread } from '../../../generated/entity/feed/thread';
@@ -41,11 +41,71 @@ function AnnouncementsWidget({
!isUndefined(handleRemoveWidget) && handleRemoveWidget(widgetKey);
}, [widgetKey]);
+ const announcement = useMemo(() => {
+ if (isAnnouncementLoading) {
+ return ;
+ }
+
+ if (isEmpty(announcements)) {
+ return (
+
- )}
+ {announcement}
);
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/FollowingWidget.less b/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/FollowingWidget.less
new file mode 100644
index 00000000000..8663a6bfb42
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/FollowingWidget.less
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2023 Collate.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.following-widget-container {
+ .ant-card-body {
+ display: flex;
+ flex-direction: column;
+ }
+}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/FollowingWidget.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/FollowingWidget.tsx
index ac164e380d9..7f442257fd7 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/FollowingWidget.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/RightSidebar/FollowingWidget.tsx
@@ -21,6 +21,7 @@ import { getUserPath } from '../../../constants/constants';
import { EntityReference } from '../../../generated/entity/type';
import { WidgetCommonProps } from '../../../pages/CustomizablePage/CustomizablePage.interface';
import { EntityListWithV1 } from '../../Entity/EntityList/EntityList';
+import './FollowingWidget.less';
export interface FollowingWidgetProps extends WidgetCommonProps {
followedData: EntityReference[];
@@ -44,7 +45,9 @@ function FollowingWidget({
}, [widgetKey]);
return (
-
+
)}
- {data.length ? (
+ {isEmpty(data) ? (
+
+
+ )}
>
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/schema-editor/SchemaEditor.tsx b/openmetadata-ui/src/main/resources/ui/src/components/schema-editor/SchemaEditor.tsx
index 48c34925013..70878c141eb 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/schema-editor/SchemaEditor.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/schema-editor/SchemaEditor.tsx
@@ -21,6 +21,7 @@ import 'codemirror/addon/selection/active-line';
import 'codemirror/lib/codemirror.css';
import 'codemirror/mode/javascript/javascript';
import 'codemirror/mode/sql/sql';
+import { isUndefined } from 'lodash';
import React, { useEffect, useState } from 'react';
import { Controlled as CodeMirror } from 'react-codemirror2';
import { JSON_TAB_SIZE } from '../../constants/constants';
@@ -83,7 +84,9 @@ const SchemaEditor = ({
_data: EditorChange,
value: string
): void => {
- onChange && onChange(getSchemaEditorValue(value));
+ if (!isUndefined(onChange)) {
+ onChange(getSchemaEditorValue(value));
+ }
};
useEffect(() => {
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json
index f719b6023dd..febef2edeae 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json
@@ -70,6 +70,7 @@
"applied-advanced-search": "Erweiterte Suche anwenden",
"apply": "Anwenden",
"approve": "Genehmigen",
+ "approved": "Approved",
"april": "April",
"as-lowercase": "als",
"asset": "Asset",
@@ -798,6 +799,7 @@
"region-name": "Region Name",
"registry": "Register",
"reject": "Ablehnen",
+ "rejected": "Rejected",
"related-term-plural": "Verwandte Begriffe",
"relevance": "Relevanz",
"remove": "Entfernen",
@@ -1320,6 +1322,7 @@
"fosters-collaboration-among-producers-and-consumers": "Setzen Sie Unternehmensziele und KPIs, um die Datenkultur Ihres Unternehmens proaktiv voranzutreiben. Fördern Sie eine Kultur kontinuierlicher Verbesserung mit rechtzeitigen Berichten zur Überwachung der Datenqualität.",
"get-started-with-open-metadata": "Erste Schritte mit OpenMetadata",
"glossary-term-description": "Jeder Begriff im Glossar hat eine eindeutige Definition. Neben der Definition des Standardbegriffs für ein Konzept können auch Synonyme sowie verwandte Begriffe (z. B. übergeordnete und untergeordnete Begriffe) angegeben werden. Es können Referenzen zu den Assets hinzugefügt werden, die sich auf die Begriffe beziehen. Neue Begriffe können dem Glossar hinzugefügt oder aktualisiert werden. Die Glossarbegriffe können von bestimmten Benutzern überprüft werden, die die Begriffe akzeptieren oder ablehnen können.",
+ "glossary-term-status": "Glossary Term was {{status}}.",
"go-back-to-login-page": "Zurück zur Anmeldeseite",
"group-team-type-change-message": "Der Teamtyp 'Gruppe' kann nicht geändert werden. Erstellen Sie bitte ein neues Team mit dem gewünschten Typ.",
"group-type-team-not-allowed-to-have-sub-team": "Teams, die als Gruppen-Typ klassifiziert sind, dürfen keine Unterteams in ihrer Struktur haben.",
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json
index 28cb709507f..d0b6eab8cbe 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json
@@ -70,6 +70,7 @@
"applied-advanced-search": "Applied Advanced Search",
"apply": "Apply",
"approve": "Approve",
+ "approved": "Approved",
"april": "April",
"as-lowercase": "as",
"asset": "Asset",
@@ -798,6 +799,7 @@
"region-name": "Region Name",
"registry": "Registry",
"reject": "Reject",
+ "rejected": "Rejected",
"related-term-plural": "Related Terms",
"relevance": "Relevance",
"remove": "Remove",
@@ -1320,6 +1322,7 @@
"fosters-collaboration-among-producers-and-consumers": "Set organizational goals and KPIs to proactively drive the data culture of your company. Foster a culture of continuous improvement with timely reports to monitor data health.",
"get-started-with-open-metadata": "Get started with OpenMetadata",
"glossary-term-description": "Every term in the glossary has a unique definition. Along with defining the standard term for a concept, the synonyms as well as related terms (for e.g., parent and child terms) can be specified. References can be added to the assets related to the terms. New terms can be added or updated to the Glossary. The glossary terms can be reviewed by certain users, who can accept or reject the terms.",
+ "glossary-term-status": "Glossary Term was {{status}}.",
"go-back-to-login-page": "Go back to Login page",
"group-team-type-change-message": "The team type 'Group' cannot be changed. Please create a new team with the preferred type.",
"group-type-team-not-allowed-to-have-sub-team": "Teams classified as Group type are not permitted to have any sub-teams within their structure.",
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json
index 3260ebae5f1..a70f3b97a5e 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json
@@ -70,6 +70,7 @@
"applied-advanced-search": "Búsqueda avanzada aplicada",
"apply": "Aplicar",
"approve": "Approve",
+ "approved": "Approved",
"april": "Abril",
"as-lowercase": "como",
"asset": "Activo",
@@ -798,6 +799,7 @@
"region-name": "Nombre de la región",
"registry": "Registro",
"reject": "Reject",
+ "rejected": "Rejected",
"related-term-plural": "Términos relacionados",
"relevance": "Relevancia",
"remove": "Eliminar",
@@ -1320,6 +1322,7 @@
"fosters-collaboration-among-producers-and-consumers": "Fomenta la colaboración entre los productores y consumidores de datos.",
"get-started-with-open-metadata": "Empezar con OpenMetadata",
"glossary-term-description": "Cada término en el glosario tiene una definición única. Además de definir el término estándar para un concepto, se pueden especificar sinónimos y términos relacionados (por ejemplo, términos padre e hijo). Se pueden agregar referencias a los activos relacionados con los términos. Se pueden agregar o actualizar nuevos términos al glosario. Los términos del glosario pueden ser revisados por ciertos usuarios, quienes pueden aceptar o rechazar los términos.",
+ "glossary-term-status": "Glossary Term was {{status}}.",
"go-back-to-login-page": "Volver a la página de inicio de sesión",
"group-team-type-change-message": "El tipo de equipo 'Grupo' no se puede cambiar. Por favor, cree un nuevo equipo con el tipo preferido.",
"group-type-team-not-allowed-to-have-sub-team": "Teams classified as Group type are not permitted to have any sub-teams within their structure.",
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json
index 19f4fdb0822..c37a643e09d 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json
@@ -70,6 +70,7 @@
"applied-advanced-search": "Appliquer la recherche avancée",
"apply": "Appliquer",
"approve": "Approuver",
+ "approved": "Approved",
"april": "Avril",
"as-lowercase": "en tant que",
"asset": "Actif",
@@ -798,6 +799,7 @@
"region-name": "Nom de Région",
"registry": "Registre",
"reject": "Rejeter",
+ "rejected": "Rejected",
"related-term-plural": "Termes Liés",
"relevance": "Pertinence",
"remove": "Retirer",
@@ -1320,6 +1322,7 @@
"fosters-collaboration-among-producers-and-consumers": "Encouragez la collaborations entre les consommateurs et producteurs de données",
"get-started-with-open-metadata": "Commencez votre Journée avec OpenMetadata",
"glossary-term-description": "Chaque terme du glossaire a une définition unique. En plus de définir le terme standard pour un concept, les synonymes ainsi que les termes associés (par exemple, les termes parent et enfant) peuvent être spécifiés. Des références peuvent être ajoutées aux actifs liés aux termes. De nouveaux termes peuvent être ajoutés ou mis à jour dans le glossaire. Les termes du glossaire peuvent être examinés par certains utilisateurs, qui peuvent accepter ou rejeter les termes.",
+ "glossary-term-status": "Glossary Term was {{status}}.",
"go-back-to-login-page": "Retour à la page d'accueil",
"group-team-type-change-message": "Le type 'Group' pour l'équipe ne peut pas être changé. Merci de créer une nouvelle équipe avec le type préférentiel.",
"group-type-team-not-allowed-to-have-sub-team": "Les équipes classées comme de type 'Groupe' ne sont pas autorisées à avoir des sous-équipes dans leur structure.",
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json
index d3a3c252037..303afc16534 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json
@@ -70,6 +70,7 @@
"applied-advanced-search": "高度な検索を適用",
"apply": "反映",
"approve": "Approve",
+ "approved": "Approved",
"april": "4月",
"as-lowercase": "as",
"asset": "アセット",
@@ -798,6 +799,7 @@
"region-name": "リージョン名",
"registry": "レジストリ",
"reject": "Reject",
+ "rejected": "Rejected",
"related-term-plural": "関連する用語",
"relevance": "Relevance",
"remove": "除外",
@@ -1320,6 +1322,7 @@
"fosters-collaboration-among-producers-and-consumers": "Fosters collaboration among the producers and consumers of data.",
"get-started-with-open-metadata": "Get started with OpenMetadata",
"glossary-term-description": "Every term in the glossary has a unique definition. Along with defining the standard term for a concept, the synonyms as well as related terms (for e.g., parent and child terms) can be specified. References can be added to the assets related to the terms. New terms can be added or updated to the Glossary. The glossary terms can be reviewed by certain users, who can accept or reject the terms.",
+ "glossary-term-status": "Glossary Term was {{status}}.",
"go-back-to-login-page": "ログインページに戻る",
"group-team-type-change-message": "The team type 'Group' cannot be changed. Please create a new team with the preferred type.",
"group-type-team-not-allowed-to-have-sub-team": "Teams classified as Group type are not permitted to have any sub-teams within their structure.",
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json
index bd426225c9b..ab4938e0aeb 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json
@@ -70,6 +70,7 @@
"applied-advanced-search": "Busca avançada aplicada",
"apply": "Aplicar",
"approve": "Approve",
+ "approved": "Approved",
"april": "Abril",
"as-lowercase": "como",
"asset": "Ativo",
@@ -798,6 +799,7 @@
"region-name": "Nome da região",
"registry": "Registro",
"reject": "Reject",
+ "rejected": "Rejected",
"related-term-plural": "Termos relacionados",
"relevance": "Relevância",
"remove": "Remover",
@@ -1320,6 +1322,7 @@
"fosters-collaboration-among-producers-and-consumers": "Promove a colaboração entre produtores e consumidores de dados.",
"get-started-with-open-metadata": "Comece com o OpenMetadata",
"glossary-term-description": "Cada termo do glossário tem uma definição única. Além de definir o termo padrão para um conceito, podem ser especificados sinônimos, bem como termos relacionados (por exemplo, termos pai e filho). Referências podem ser adicionadas aos ativos relacionados aos termos. Novos termos podem ser adicionados ou atualizados no glossário. Os termos do glossário podem ser revisados por determinados usuários, que podem aceitar ou rejeitar os termos.",
+ "glossary-term-status": "Glossary Term was {{status}}.",
"go-back-to-login-page": "Voltar para a página de login",
"group-team-type-change-message": "O tipo de equipe 'Grupo' não pode ser alterado. Por favor, crie uma nova equipe com o tipo preferido.",
"group-type-team-not-allowed-to-have-sub-team": "Teams classified as Group type are not permitted to have any sub-teams within their structure.",
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json
index 9da09173e96..e3ff722d0da 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json
@@ -70,6 +70,7 @@
"applied-advanced-search": "Примененный расширенный поиск",
"apply": "Применить",
"approve": "Approve",
+ "approved": "Approved",
"april": "Апрель",
"as-lowercase": "как",
"asset": "Объект",
@@ -798,6 +799,7 @@
"region-name": "Наименование региона",
"registry": "Реестр",
"reject": "Reject",
+ "rejected": "Rejected",
"related-term-plural": "Связанные термины",
"relevance": "Актуальность",
"remove": "Удалить",
@@ -1320,6 +1322,7 @@
"fosters-collaboration-among-producers-and-consumers": "Способствует сотрудничеству между производителями и потребителями данных.",
"get-started-with-open-metadata": "Начните работу с OpenMetadata",
"glossary-term-description": "Каждый термин в глоссарии имеет уникальное определение. Наряду с определением стандартного термина для понятия можно указать синонимы, а также связанные термины (например, родительские и дочерние термины). Ссылки могут быть добавлены к объектам данных, связанным с терминами. Новые термины могут быть добавлены или обновлены в Глоссарий. Термины глоссария могут быть просмотрены определенными пользователями, которые могут принять или отклонить термины.",
+ "glossary-term-status": "Glossary Term was {{status}}.",
"go-back-to-login-page": "Вернуться на страницу входа",
"group-team-type-change-message": "Тип команды «Группа» изменить нельзя. Пожалуйста, создайте новую команду с предпочтительным типом.",
"group-type-team-not-allowed-to-have-sub-team": "Командам, относящимся к групповому типу, не разрешается иметь какие-либо подкоманды в своей структуре.",
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json
index cb5ef063a81..5dc6fedf5cf 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json
@@ -70,6 +70,7 @@
"applied-advanced-search": "应用高级搜索",
"apply": "应用",
"approve": "Approve",
+ "approved": "Approved",
"april": "四月",
"as-lowercase": "作为",
"asset": "资产",
@@ -798,6 +799,7 @@
"region-name": "区域名称",
"registry": "仓库",
"reject": "Reject",
+ "rejected": "Rejected",
"related-term-plural": "关联术语",
"relevance": "相关性",
"remove": "删除",
@@ -1320,6 +1322,7 @@
"fosters-collaboration-among-producers-and-consumers": "促进数据生产者和使用者之间的合作",
"get-started-with-open-metadata": "开始使用 OpenMetadata",
"glossary-term-description": "术语库中的每个术语都有一个唯一的定义。除了为概念定义标准术语之外,还可以指定同义词以及相关术语(例如,父项和子项)。可以向与术语相关的资产添加引用。可以向术语库添加或更新新术语。某些用户可以审查术语,并接受或拒绝这些术语。",
+ "glossary-term-status": "Glossary Term was {{status}}.",
"go-back-to-login-page": "返回登录页面",
"group-team-type-change-message": "团队类型“组”无法更改,请创建一个具有所需类型的新团队",
"group-type-team-not-allowed-to-have-sub-team": "被设为“组”的团队类型,无法再拥有子团队",
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/CustomPropertiesPageV1/CustomPropertiesPageV1.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/CustomPropertiesPageV1/CustomPropertiesPageV1.tsx
index 970600a505c..aed35327670 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/CustomPropertiesPageV1/CustomPropertiesPageV1.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/CustomPropertiesPageV1/CustomPropertiesPageV1.tsx
@@ -15,7 +15,13 @@ import { Button, Col, Row, Tabs } from 'antd';
import { AxiosError } from 'axios';
import { compare } from 'fast-json-patch';
import { isUndefined } from 'lodash';
-import { default as React, useEffect, useMemo, useState } from 'react';
+import {
+ default as React,
+ useCallback,
+ useEffect,
+ useMemo,
+ useState,
+} from 'react';
import { useTranslation } from 'react-i18next';
import { useHistory, useParams } from 'react-router-dom';
import ErrorPlaceHolder from '../../components/common/error-with-placeholder/ErrorPlaceHolder';
@@ -55,7 +61,7 @@ const CustomEntityDetailV1 = () => {
const [isButtonLoading, setIsButtonLoading] = useState(false);
- const tabAttributePath = ENTITY_PATH[tab];
+ const tabAttributePath = useMemo(() => ENTITY_PATH[tab], [tab]);
const { getEntityPermission } = usePermissionProvider();
@@ -91,34 +97,37 @@ const CustomEntityDetailV1 = () => {
setIsLoading(false);
};
- const onTabChange = (activeKey: string) => {
+ const onTabChange = useCallback((activeKey: string) => {
setActiveTab(activeKey as EntityTabs);
- };
+ }, []);
- const handleAddProperty = () => {
+ const handleAddProperty = useCallback(() => {
const path = getAddCustomPropertyPath(tabAttributePath);
history.push(path);
- };
+ }, [tabAttributePath, history]);
- const updateEntityType = async (properties: Type['customProperties']) => {
- setIsButtonLoading(true);
- const patch = compare(selectedEntityTypeDetail, {
- ...selectedEntityTypeDetail,
- customProperties: properties,
- });
+ const updateEntityType = useCallback(
+ async (properties: Type['customProperties']) => {
+ setIsButtonLoading(true);
+ const patch = compare(selectedEntityTypeDetail, {
+ ...selectedEntityTypeDetail,
+ customProperties: properties,
+ });
- try {
- const data = await updateType(selectedEntityTypeDetail.id || '', patch);
- setSelectedEntityTypeDetail((prev) => ({
- ...prev,
- customProperties: data.customProperties,
- }));
- } catch (error) {
- showErrorToast(error as AxiosError);
- } finally {
- setIsButtonLoading(false);
- }
- };
+ try {
+ const data = await updateType(selectedEntityTypeDetail.id ?? '', patch);
+ setSelectedEntityTypeDetail((prev) => ({
+ ...prev,
+ customProperties: data.customProperties,
+ }));
+ } catch (error) {
+ showErrorToast(error as AxiosError);
+ } finally {
+ setIsButtonLoading(false);
+ }
+ },
+ [selectedEntityTypeDetail.id]
+ );
const customPageHeader = useMemo(() => {
switch (tabAttributePath) {
@@ -166,7 +175,7 @@ const CustomEntityDetailV1 = () => {
setIsError(false);
fetchTypeDetail(tabAttributePath);
}
- }, [tab]);
+ }, [tabAttributePath]);
useEffect(() => {
if (selectedEntityTypeDetail?.id) {
@@ -175,13 +184,13 @@ const CustomEntityDetailV1 = () => {
}, [selectedEntityTypeDetail]);
const tabs = useMemo(() => {
- const { customProperties } = selectedEntityTypeDetail;
+ const { customProperties, schema } = selectedEntityTypeDetail;
return [
{
label: (
{
)}