Skip to content

Commit

Permalink
Merge pull request #42810 from tienifr/fix/42220
Browse files Browse the repository at this point in the history
fix: empty ui does not show when deleting all tags
  • Loading branch information
Beamanator authored May 31, 2024
2 parents 2eb16f4 + b63afd3 commit e915d36
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/workspace/tags/WorkspaceTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
</View>
);

const hasVisibleTag = tagList.some((tag) => tag.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || isOffline);

return (
<AccessOrNotFoundWrapper
policyID={policyID}
Expand Down Expand Up @@ -329,14 +331,14 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
color={theme.spinner}
/>
)}
{tagList.length === 0 && !isLoading && (
{!hasVisibleTag && !isLoading && (
<WorkspaceEmptyStateSection
title={translate('workspace.tags.emptyTags.title')}
icon={Illustrations.EmptyStateExpenses}
subtitle={translate('workspace.tags.emptyTags.subtitle')}
/>
)}
{tagList.length > 0 && !isLoading && (
{hasVisibleTag && !isLoading && (
<SelectionList
canSelectMultiple={canSelectMultiple}
sections={[{data: tagList, isDisabled: false}]}
Expand Down

0 comments on commit e915d36

Please sign in to comment.