Skip to content

Commit

Permalink
feat: add empty state for Tags (#24702)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh authored Jul 27, 2023
1 parent 4b1f1d4 commit e5d626c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions superset-frontend/src/pages/Tags/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ import { Tag as AntdTag } from 'antd';
import { Tag } from 'src/views/CRUD/types';
import TagCard from 'src/features/tags/TagCard';

const emptyState = {
title: t('No Tags created'),
image: 'dashboard.svg',
description:
'Create a new tag and assign it to existing entities like charts or dashboards',
buttonAction: () => {},
// todo(hughhh): Add this back once Tag modal is functional
// buttonText: (
// <>
// <i className="fa fa-plus" data-test="add-rule-empty" />{' '}
// {'Create a new Tag'}{' '}
// </>
// ),
};

const PAGE_SIZE = 25;

interface TagListProps {
Expand Down Expand Up @@ -303,6 +318,7 @@ function TagList(props: TagListProps) {
count={tagCount}
data={tags.filter(tag => !tag.name.includes(':'))}
disableBulkSelect={toggleBulkSelect}
emptyState={emptyState}
fetchData={fetchData}
filters={filters}
initialSort={initialSort}
Expand Down

0 comments on commit e5d626c

Please sign in to comment.