fix(ui): Remove add limit on Entity Profile for glossary terms and tags (#5780)

This commit is contained in:
John Joyce 2022-08-31 08:51:08 -07:00 committed by GitHub
parent 9bffad5a9e
commit 7cfae0d7a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,7 +283,7 @@ export default function TagTermGroup({
{EMPTY_MESSAGES.terms.title}. {EMPTY_MESSAGES.terms.description}
</Typography.Paragraph>
)}
{canAddTag && (uneditableTags?.tags?.length || 0) + (editableTags?.tags?.length || 0) < 10 && (
{canAddTag && (
<NoElementButton
type={showEmptyMessage && tagsEmpty ? 'default' : 'text'}
onClick={() => {
@ -296,20 +296,19 @@ export default function TagTermGroup({
<span>Add Tags</span>
</NoElementButton>
)}
{canAddTerm &&
(uneditableGlossaryTerms?.terms?.length || 0) + (editableGlossaryTerms?.terms?.length || 0) < 10 && (
<NoElementButton
type={showEmptyMessage && tagsEmpty ? 'default' : 'text'}
onClick={() => {
setAddModalType(EntityType.GlossaryTerm);
setShowAddModal(true);
}}
{...buttonProps}
>
<PlusOutlined />
<span>Add Terms</span>
</NoElementButton>
)}
{canAddTerm && (
<NoElementButton
type={showEmptyMessage && tagsEmpty ? 'default' : 'text'}
onClick={() => {
setAddModalType(EntityType.GlossaryTerm);
setShowAddModal(true);
}}
{...buttonProps}
>
<PlusOutlined />
<span>Add Terms</span>
</NoElementButton>
)}
{showAddModal && !!entityUrn && !!entityType && (
<EditTagTermsModal
type={addModalType}