mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-29 00:18:24 +00:00
fix the loading of tag input (#11687)
This commit is contained in:
parent
cd464c4272
commit
853ffc6001
@ -51,12 +51,13 @@ const ContainerDataModel: FC<ContainerDataModelProps> = ({
|
||||
useState<Column>();
|
||||
|
||||
const [isTagLoading, setIsTagLoading] = useState<boolean>(false);
|
||||
const [isGlossaryLoading, setIsGlossaryLoading] = useState<boolean>(false);
|
||||
const [tagFetchFailed, setTagFetchFailed] = useState<boolean>(false);
|
||||
const [glossaryTags, setGlossaryTags] = useState<TagOption[]>([]);
|
||||
const [classificationTags, setClassificationTags] = useState<TagOption[]>([]);
|
||||
|
||||
const fetchGlossaryTags = async () => {
|
||||
setIsTagLoading(true);
|
||||
setIsGlossaryLoading(true);
|
||||
try {
|
||||
const res = await fetchGlossaryTerms();
|
||||
|
||||
@ -67,7 +68,7 @@ const ContainerDataModel: FC<ContainerDataModelProps> = ({
|
||||
} catch {
|
||||
setTagFetchFailed(true);
|
||||
} finally {
|
||||
setIsTagLoading(false);
|
||||
setIsGlossaryLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -252,7 +253,7 @@ const ContainerDataModel: FC<ContainerDataModelProps> = ({
|
||||
hasTagEditAccess={hasTagEditAccess}
|
||||
index={index}
|
||||
isReadOnly={isReadOnly}
|
||||
isTagLoading={isTagLoading}
|
||||
isTagLoading={isGlossaryLoading}
|
||||
record={record}
|
||||
tagFetchFailed={tagFetchFailed}
|
||||
tagList={glossaryTags}
|
||||
@ -274,6 +275,7 @@ const ContainerDataModel: FC<ContainerDataModelProps> = ({
|
||||
editContainerColumnDescription,
|
||||
isReadOnly,
|
||||
isTagLoading,
|
||||
isGlossaryLoading,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@ -114,6 +114,8 @@ const DashboardDetails = ({
|
||||
|
||||
const [tagFetchFailed, setTagFetchFailed] = useState<boolean>(false);
|
||||
const [isTagLoading, setIsTagLoading] = useState<boolean>(false);
|
||||
const [isGlossaryLoading, setIsGlossaryLoading] = useState<boolean>(false);
|
||||
|
||||
const [threadLink, setThreadLink] = useState<string>('');
|
||||
|
||||
const [elementRef, isInView] = useElementInView(observerOptions);
|
||||
@ -228,7 +230,7 @@ const DashboardDetails = ({
|
||||
);
|
||||
|
||||
const fetchGlossaryTags = async () => {
|
||||
setIsTagLoading(true);
|
||||
setIsGlossaryLoading(true);
|
||||
try {
|
||||
const res = await fetchGlossaryTerms();
|
||||
|
||||
@ -239,7 +241,7 @@ const DashboardDetails = ({
|
||||
} catch {
|
||||
setTagFetchFailed(true);
|
||||
} finally {
|
||||
setIsTagLoading(false);
|
||||
setIsGlossaryLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -689,7 +691,7 @@ const DashboardDetails = ({
|
||||
hasTagEditAccess={hasEditTagAccess(record)}
|
||||
index={index}
|
||||
isReadOnly={deleted}
|
||||
isTagLoading={isTagLoading}
|
||||
isTagLoading={isGlossaryLoading}
|
||||
record={record}
|
||||
tagFetchFailed={tagFetchFailed}
|
||||
tagList={glossaryTags}
|
||||
@ -699,7 +701,18 @@ const DashboardDetails = ({
|
||||
),
|
||||
},
|
||||
],
|
||||
[renderDescription]
|
||||
[
|
||||
deleted,
|
||||
isTagLoading,
|
||||
isGlossaryLoading,
|
||||
tagFetchFailed,
|
||||
glossaryTags,
|
||||
classificationTags,
|
||||
renderDescription,
|
||||
fetchGlossaryTags,
|
||||
handleChartTagSelection,
|
||||
hasEditTagAccess,
|
||||
]
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@ -43,13 +43,14 @@ const ModelTab = ({
|
||||
const { t } = useTranslation();
|
||||
const [editColumnDescription, setEditColumnDescription] = useState<Column>();
|
||||
const [isTagLoading, setIsTagLoading] = useState<boolean>(false);
|
||||
const [isGlossaryLoading, setIsGlossaryLoading] = useState<boolean>(false);
|
||||
const [tagFetchFailed, setTagFetchFailed] = useState<boolean>(false);
|
||||
|
||||
const [glossaryTags, setGlossaryTags] = useState<TagOption[]>([]);
|
||||
const [classificationTags, setClassificationTags] = useState<TagOption[]>([]);
|
||||
|
||||
const fetchGlossaryTags = async () => {
|
||||
setIsTagLoading(true);
|
||||
setIsGlossaryLoading(true);
|
||||
try {
|
||||
const res = await fetchGlossaryTerms();
|
||||
|
||||
@ -60,7 +61,7 @@ const ModelTab = ({
|
||||
} catch {
|
||||
setTagFetchFailed(true);
|
||||
} finally {
|
||||
setIsTagLoading(false);
|
||||
setIsGlossaryLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -224,7 +225,7 @@ const ModelTab = ({
|
||||
hasTagEditAccess={hasEditTagsPermission}
|
||||
index={index}
|
||||
isReadOnly={isReadOnly}
|
||||
isTagLoading={isTagLoading}
|
||||
isTagLoading={isGlossaryLoading}
|
||||
record={record}
|
||||
tagFetchFailed={tagFetchFailed}
|
||||
tagList={glossaryTags}
|
||||
@ -246,6 +247,7 @@ const ModelTab = ({
|
||||
hasEditDescriptionPermission,
|
||||
isReadOnly,
|
||||
isTagLoading,
|
||||
isGlossaryLoading,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@ -106,10 +106,11 @@ const EntityTable = ({
|
||||
}>();
|
||||
|
||||
const [isTagLoading, setIsTagLoading] = useState<boolean>(false);
|
||||
const [isGlossaryLoading, setIsGlossaryLoading] = useState<boolean>(false);
|
||||
const [tagFetchFailed, setTagFetchFailed] = useState<boolean>(false);
|
||||
|
||||
const fetchGlossaryTags = async () => {
|
||||
setIsTagLoading(true);
|
||||
setIsGlossaryLoading(true);
|
||||
try {
|
||||
const res = await fetchGlossaryTerms();
|
||||
|
||||
@ -120,7 +121,7 @@ const EntityTable = ({
|
||||
} catch {
|
||||
setTagFetchFailed(true);
|
||||
} finally {
|
||||
setIsTagLoading(false);
|
||||
setIsGlossaryLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -566,7 +567,7 @@ const EntityTable = ({
|
||||
hasTagEditAccess={hasTagEditAccess}
|
||||
index={index}
|
||||
isReadOnly={isReadOnly}
|
||||
isTagLoading={isTagLoading}
|
||||
isTagLoading={isGlossaryLoading}
|
||||
record={record}
|
||||
tagFetchFailed={tagFetchFailed}
|
||||
tagList={glossaryTags}
|
||||
@ -585,6 +586,7 @@ const EntityTable = ({
|
||||
entityFqn,
|
||||
tableConstraints,
|
||||
isTagLoading,
|
||||
isGlossaryLoading,
|
||||
handleUpdate,
|
||||
handleTagSelection,
|
||||
renderDataTypeDisplay,
|
||||
|
||||
@ -54,6 +54,7 @@ const MlModelFeaturesList = ({
|
||||
);
|
||||
const [editDescription, setEditDescription] = useState<boolean>(false);
|
||||
const [isTagLoading, setIsTagLoading] = useState<boolean>(false);
|
||||
const [isGlossaryLoading, setIsGlossaryLoading] = useState<boolean>(false);
|
||||
const [tagFetchFailed, setTagFetchFailed] = useState<boolean>(false);
|
||||
|
||||
const [glossaryTags, setGlossaryTags] = useState<TagOption[]>([]);
|
||||
@ -116,7 +117,7 @@ const MlModelFeaturesList = ({
|
||||
};
|
||||
|
||||
const fetchGlossaryTags = async () => {
|
||||
setIsTagLoading(true);
|
||||
setIsGlossaryLoading(true);
|
||||
try {
|
||||
const res = await fetchGlossaryTerms();
|
||||
|
||||
@ -127,7 +128,7 @@ const MlModelFeaturesList = ({
|
||||
} catch {
|
||||
setTagFetchFailed(true);
|
||||
} finally {
|
||||
setIsTagLoading(false);
|
||||
setIsGlossaryLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -215,7 +216,7 @@ const MlModelFeaturesList = ({
|
||||
hasTagEditAccess={hasEditPermission}
|
||||
index={index}
|
||||
isReadOnly={isDeleted}
|
||||
isTagLoading={isTagLoading}
|
||||
isTagLoading={isGlossaryLoading}
|
||||
record={feature}
|
||||
tagFetchFailed={tagFetchFailed}
|
||||
tagList={glossaryTags}
|
||||
|
||||
@ -196,6 +196,7 @@ const PipelineDetails = ({
|
||||
const [activityFilter, setActivityFilter] = useState<ActivityFilters>();
|
||||
|
||||
const [isTagLoading, setIsTagLoading] = useState<boolean>(false);
|
||||
const [isGlossaryLoading, setIsGlossaryLoading] = useState<boolean>(false);
|
||||
const [tagFetchFailed, setTagFetchFailed] = useState<boolean>(false);
|
||||
const [glossaryTags, setGlossaryTags] = useState<TagOption[]>([]);
|
||||
const [classificationTags, setClassificationTags] = useState<TagOption[]>([]);
|
||||
@ -255,7 +256,7 @@ const PipelineDetails = ({
|
||||
}, [pipelineDetails.id, getEntityPermission, setPipelinePermissions]);
|
||||
|
||||
const fetchGlossaryTags = async () => {
|
||||
setIsTagLoading(true);
|
||||
setIsGlossaryLoading(true);
|
||||
try {
|
||||
const res = await fetchGlossaryTerms();
|
||||
|
||||
@ -266,7 +267,7 @@ const PipelineDetails = ({
|
||||
} catch {
|
||||
setTagFetchFailed(true);
|
||||
} finally {
|
||||
setIsTagLoading(false);
|
||||
setIsGlossaryLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -697,7 +698,7 @@ const PipelineDetails = ({
|
||||
hasTagEditAccess={hasTagEditAccess}
|
||||
index={index}
|
||||
isReadOnly={deleted}
|
||||
isTagLoading={isTagLoading}
|
||||
isTagLoading={isGlossaryLoading}
|
||||
record={record}
|
||||
tagFetchFailed={tagFetchFailed}
|
||||
tagList={glossaryTags}
|
||||
@ -717,6 +718,7 @@ const PipelineDetails = ({
|
||||
editTask,
|
||||
deleted,
|
||||
isTagLoading,
|
||||
isGlossaryLoading,
|
||||
tagFetchFailed,
|
||||
glossaryTags,
|
||||
]
|
||||
|
||||
@ -63,6 +63,7 @@ const TopicSchemaFields: FC<TopicSchemaFieldsProps> = ({
|
||||
const { t } = useTranslation();
|
||||
const [editFieldDescription, setEditFieldDescription] = useState<Field>();
|
||||
const [isTagLoading, setIsTagLoading] = useState<boolean>(false);
|
||||
const [isGlossaryLoading, setIsGlossaryLoading] = useState<boolean>(false);
|
||||
const [tagFetchFailed, setTagFetchFailed] = useState<boolean>(false);
|
||||
const [viewType, setViewType] = useState<SchemaViewType>(
|
||||
SchemaViewType.FIELDS
|
||||
@ -72,7 +73,7 @@ const TopicSchemaFields: FC<TopicSchemaFieldsProps> = ({
|
||||
const [classificationTags, setClassificationTags] = useState<TagOption[]>([]);
|
||||
|
||||
const fetchGlossaryTags = async () => {
|
||||
setIsTagLoading(true);
|
||||
setIsGlossaryLoading(true);
|
||||
try {
|
||||
const res = await fetchGlossaryTerms();
|
||||
|
||||
@ -83,7 +84,7 @@ const TopicSchemaFields: FC<TopicSchemaFieldsProps> = ({
|
||||
} catch {
|
||||
setTagFetchFailed(true);
|
||||
} finally {
|
||||
setIsTagLoading(false);
|
||||
setIsGlossaryLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -249,7 +250,7 @@ const TopicSchemaFields: FC<TopicSchemaFieldsProps> = ({
|
||||
hasTagEditAccess={hasTagEditAccess}
|
||||
index={index}
|
||||
isReadOnly={isReadOnly}
|
||||
isTagLoading={isTagLoading}
|
||||
isTagLoading={isGlossaryLoading}
|
||||
record={record}
|
||||
tagFetchFailed={tagFetchFailed}
|
||||
tagList={glossaryTags}
|
||||
@ -262,6 +263,7 @@ const TopicSchemaFields: FC<TopicSchemaFieldsProps> = ({
|
||||
[
|
||||
handleFieldTagsChange,
|
||||
fetchGlossaryTags,
|
||||
isGlossaryLoading,
|
||||
messageSchema,
|
||||
hasDescriptionEditAccess,
|
||||
hasTagEditAccess,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user